File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3
3
audio.cpp
4
4
5
5
Created on: Oct 28.2018 */ char audioI2SVers[] =" \
6
- Version 3.1.0s " ;
7
- /* Updated on: Apr 22 .2025
6
+ Version 3.1.0t " ;
7
+ /* Updated on: Apr 23 .2025
8
8
9
9
Author: Wolle (schreibfaul1)
10
10
Audio library for ESP32 or ESP32-S3
@@ -3189,9 +3189,8 @@ void Audio::processLocalFile() {
3189
3189
while (m_f_audioTaskIsDecoding) vTaskDelay (1 ); // We can't reset the InBuffer while the decoding is in progress
3190
3190
audiofile.seek (m_resumeFilePos);
3191
3191
InBuff.resetBuffer ();
3192
- m_sumBytesDecoded = m_haveNewFilePos = m_resumeFilePos;
3192
+ m_haveNewFilePos = m_resumeFilePos;
3193
3193
m_resumeFilePos = -1 ;
3194
- if (m_codec == CODEC_MP3) MP3Decoder_ClearBuffer ();
3195
3194
m_f_lockInBuffer = false ;
3196
3195
}
3197
3196
@@ -4875,6 +4874,7 @@ bool Audio::setTimeOffset(int sec) { // fast forward or rewind the current posit
4875
4874
4876
4875
int32_t pos = getFilePos () - inBufferFilled ();
4877
4876
pos += offset;
4877
+ m_sumBytesDecoded += offset; // for the file length calculation
4878
4878
if (pos < (int32_t )startAB) {pos = startAB;}
4879
4879
if (pos >= (int32_t )endAB) {pos = endAB;}
4880
4880
setFilePos (pos);
You can’t perform that action at this time.
0 commit comments