[client] audio: tell the audiodev to stop on the last packet, not after

This commit is contained in:
Geoffrey McRae 2022-01-18 23:43:12 +11:00
parent 73dc08e5f9
commit 4fadf3a130

View File

@ -140,7 +140,8 @@ static int playbackPullFrames(uint8_t ** data, int frames)
else else
frames = 0; frames = 0;
if (audio.playback.state == STREAM_STATE_DRAIN && frames == 0) if (audio.playback.state == STREAM_STATE_DRAIN &&
ringbuffer_getCount(audio.playback.buffer) == 0)
playbackStopNL(); playbackStopNL();
LG_UNLOCK(audio.playback.lock); LG_UNLOCK(audio.playback.lock);