Constant stuttering sound on LGE Nexus 4 with Deezer Android SDK

Audio playback was successfully tested on the Samsung Galaxy S3 and HTC One, but was severely disrupted on the LGE Nexus 4 running Android 4.4. What happens is that a perfectly beautiful sound can be heard for a second, then a few seconds of silence, followed by another short piece of sound, then silence, and so it goes. Thus, it seems that the logic of the audio stream ends in an eternal cycle of start-play-disrupt-stop.

Every two or so, I see the following warning:

12-09 00:55:56.982 10842-14365/com.soundrop.android W/AudioTrack﹕ releaseBuffer() track 0x7b03f4e0 name=s:176;n:2;f:-1 disabled due to previous underrun, restarting 12-09 00:55:57.583 10842-14367/com.soundrop.android W/AudioTrack﹕ releaseBuffer() track 0x7b03f4e0 name=s:176;n:2;f:-1 disabled due to previous underrun, restarting 12-09 00:55:58.594 10842-14369/com.soundrop.android W/AudioTrack﹕ releaseBuffer() track 0x7b03f4e0 name=s:176;n:2;f:-1 disabled due to previous underrun, restarting 12-09 00:55:59.595 10842-14371/com.soundrop.android W/AudioTrack﹕ releaseBuffer() track 0x7b03f4e0 name=s:176;n:2;f:-1 disabled due to previous underrun, restarting 12-09 00:56:02.047 10842-14379/com.soundrop.android W/AudioTrack﹕ releaseBuffer() track 0x7b03f4e0 name=s:176;n:2;f:-1 disabled due to previous underrun, restarting 

This made me think about the possible differences in the sound buffer between devices, so I did some research:

 HTC One (good playback): AudioTrack.getMinBufferSize(44100, STEREO, ENCODING_PCM_16BIT) => 16932 LGE Nexus 4 (bad playback): AudioTrack.getMinBufferSize(44100, STEREO, ENCODING_PCM_16BIT) => 7056 

My guess is that the Deezer Android SDK sets the buffer size too small on this particular device, as it seems to choose a buffer size that is 10x of the specified minimum size.

UPDATE: just stuttering sound was played on HTC One running 4.4, where getMinBufferSize () returns 16932 (as on Android <4.4). Thus, this problem is clearly device-independent, but is related to OS-specific behavior changes, starting with KitKat.

+8
android deezer
source share
1 answer

This is really a problem with updating Android 4.4. Something in the AudioTrack implementation has changed and caused these problems.

We are currently working on a fix for this problem, and we will publish it as soon as possible.

+1
source share

All Articles