Skip to content

Commit 131b945

Browse files
committed
audiomp3: reset decoded_samples when file resets
In testing, I saw that the decoded_samples value kept increasing when I stopped and restarted playback, as I'd missed setting it back to zero during the reset operation.
1 parent 98b0029 commit 131b945

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

shared-module/audiomp3/MP3Decoder.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ void audiomp3_mp3file_reset_buffer(audiomp3_mp3file_obj_t *self,
304304
f_lseek(&self->file->fp, 0);
305305
self->inbuf_offset = self->inbuf_length;
306306
self->eof = 0;
307+
self->samples_decoded = 0;
307308
self->other_channel = -1;
308309
mp3file_update_inbuf_half(self);
309310
mp3file_skip_id3v2(self);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy