Search code examples
androidaudiomp3android-ndkwav

Android libmpg123 weird sound 'drops'


I'm using libmpg123 as a library from native code (Android NDK) to decode a MP3 file to PCM (signed 16 bit) data. It works great, with the exception that the speakers make a weird sound once or twice every few seconds. To figure out what was wrong, I opened the audio in audacity and found this weird drop in audio sometimes.

The 'rest' of the audio sounds great, by the way. The overall quality is good.

Any ideas how this might happen? I'm totally lost...

audio drop


Solution

  • Those are unclipped overflows (a 32768, where 32767 is the largest positive 16bit value). Are you doing anything to the data? Is what you opened the actual mp3 or the decoded pcm (just to be sure)?