mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] audio: don't lock when consuming frames from the buffer
This commit is contained in:
parent
d6bbc4f89c
commit
4b080f7610
@ -133,8 +133,6 @@ void playbackStopNL(void)
|
||||
|
||||
static int playbackPullFrames(uint8_t ** data, int frames)
|
||||
{
|
||||
LG_LOCK(audio.playback.lock);
|
||||
|
||||
if (audio.playback.buffer)
|
||||
*data = ringbuffer_consume(audio.playback.buffer, &frames);
|
||||
else
|
||||
@ -142,9 +140,11 @@ static int playbackPullFrames(uint8_t ** data, int frames)
|
||||
|
||||
if (audio.playback.state == STREAM_STATE_DRAIN &&
|
||||
ringbuffer_getCount(audio.playback.buffer) == 0)
|
||||
{
|
||||
LG_LOCK(audio.playback.lock);
|
||||
playbackStopNL();
|
||||
|
||||
LG_UNLOCK(audio.playback.lock);
|
||||
}
|
||||
return frames;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user