33 audio.cpp
44
55 Created on: Oct 28.2018 */ char audioI2SVers[] =" \
6- Version 3.4.1m " ;
7- /* Updated on: Aug 18 .2025
6+ Version 3.4.1n " ;
7+ /* Updated on: Aug 19 .2025
88
99 Author: Wolle (schreibfaul1)
1010 Audio library for ESP32, ESP32-S3 or ESP32-P4
@@ -6535,11 +6535,15 @@ int32_t Audio::newInBuffStart(int32_t m_resumeFilePos){
65356535 buffFillSize = min (m_audioDataSize - m_resumeFilePos, UINT16_MAX);
65366536
65376537 m_f_lockInBuffer = true ; // lock the buffer, the InBuffer must not be re-entered in playAudioData()
6538+ {
65386539 while (m_f_audioTaskIsDecoding) vTaskDelay (1 ); // We can't reset the InBuffer while the decoding is in progress
65396540 m_f_allDataReceived = false ;
65406541
65416542/* process before */
6542- if (m_codec == CODEC_M4A) m_resumeFilePos += m4a_correctResumeFilePos (); {if (m_resumeFilePos == -1 ) goto exit;}
6543+ if (m_codec == CODEC_M4A){
6544+ m_resumeFilePos += m4a_correctResumeFilePos ();
6545+ if (m_resumeFilePos == -1 ) goto exit;
6546+ }
65436547
65446548/* skip to position */
65456549 res = audioFileSeek (m_resumeFilePos);
@@ -6557,6 +6561,7 @@ int32_t Audio::newInBuffStart(int32_t m_resumeFilePos){
65576561 offset += bytesRead;
65586562 }
65596563 InBuff.bytesWritten (buffFillSize);
6564+
65606565/* process after */
65616566 offset = 0 ;
65626567 if (m_codec == CODEC_OPUS || m_codec == CODEC_VORBIS) {if (InBuff.bufferFilled () < 0xFFFF ) return - 1 ;} // ogg frame <= 64kB
@@ -6568,7 +6573,7 @@ int32_t Audio::newInBuffStart(int32_t m_resumeFilePos){
65686573
65696574
65706575 InBuff.bytesWasRead (offset);
6571-
6576+ }
65726577 m_f_lockInBuffer = false ;
65736578 return res + offset;
65746579exit:
0 commit comments