Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
flow3r firmware
Commits
d941f137
Commit
d941f137
authored
Sep 15, 2023
by
dos
Committed by
pippin
Sep 16, 2023
Browse files
Options
Downloads
Patches
Plain Diff
audio_mp3: Implement seek to beginning
parent
ba2654a9
No related branches found
No related tags found
No related merge requests found
Pipeline
#8166
passed
Sep 16, 2023
Stage: check
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/audio_mp3/audio_mp3.c
+10
-0
10 additions, 0 deletions
components/audio_mp3/audio_mp3.c
with
10 additions
and
0 deletions
components/audio_mp3/audio_mp3.c
+
10
−
0
View file @
d941f137
...
@@ -141,6 +141,16 @@ static void mp3_draw(st3m_media *media, Ctx *ctx) {
...
@@ -141,6 +141,16 @@ static void mp3_draw(st3m_media *media, Ctx *ctx) {
static
void
mp3_think
(
st3m_media
*
media
,
float
ms_elapsed
)
{
static
void
mp3_think
(
st3m_media
*
media
,
float
ms_elapsed
)
{
mp3_state
*
self
=
(
void
*
)
media
;
mp3_state
*
self
=
(
void
*
)
media
;
if
(
self
->
file
&&
self
->
control
.
seek
==
0
)
{
rewind
(
self
->
file
);
self
->
offset
=
0
;
self
->
pos
=
0
;
self
->
control
.
time
=
0
;
self
->
control
.
position
=
0
;
self
->
control
.
seek
=
-
1
;
mp3dec_init
(
&
self
->
mp3d
);
}
mp3_fetch_data
(
self
);
mp3_fetch_data
(
self
);
self
->
scroll_pos
+=
ms_elapsed
/
1000
.
0
;
self
->
scroll_pos
+=
ms_elapsed
/
1000
.
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment