Skip to content

Commit 915020b

Browse files
committed
prepare for new libmad mp3 decoder
1 parent aa2badc commit 915020b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Audio.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
audio.cpp
44
55
Created on: Oct 28.2018 */char audioI2SVers[] ="\
6-
Version 3.3.2l ";
6+
Version 3.3.2m ";
77
/* Updated on: Jul 09.2025
88
99
Author: Wolle (schreibfaul1)
@@ -4734,7 +4734,7 @@ int Audio::sendBytes(uint8_t* data, size_t len) {
47344734
m_validSamples = len;
47354735
}
47364736
break;
4737-
case CODEC_MP3: m_validSamples = MP3GetOutputSamps() / getChannels();
4737+
case CODEC_MP3: m_validSamples = MP3GetOutputSamps();
47384738
break;
47394739
case CODEC_AAC: m_validSamples = AACGetOutputSamps() / getChannels();
47404740
if(!m_sbyt.isPS && AACGetParametricStereo()){ // only change 0 -> 1

src/mp3_decoder/mp3_decoder.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,8 +1540,7 @@ void MP3GetLastFrameInfo() {
15401540
m_MP3FrameInfo->nChans=m_MP3DecInfo->nChans;
15411541
m_MP3FrameInfo->samprate=m_MP3DecInfo->samprate;
15421542
m_MP3FrameInfo->bitsPerSample=16;
1543-
m_MP3FrameInfo->outputSamps=m_MP3DecInfo->nChans
1544-
* (int32_t) samplesPerFrameTab[m_MPEGVersion][m_MP3DecInfo->layer-1];
1543+
m_MP3FrameInfo->outputSamps = (int32_t) samplesPerFrameTab[m_MPEGVersion][m_MP3DecInfo->layer-1];
15451544
m_MP3FrameInfo->layer=m_MP3DecInfo->layer;
15461545
m_MP3FrameInfo->version=m_MPEGVersion;
15471546
}

0 commit comments

Comments
 (0)