From 1ddeba7765e0ebd9f6a8bee5c66c3801098a9e23 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 27 Apr 2021 20:52:29 -0700 Subject: cache_audio: narrow scope of SndBuffer *buff also stop unnecessary NULL initialization --- src/rmd_cache_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rmd_cache_audio.c b/src/rmd_cache_audio.c index 00d2097..1fd21b7 100644 --- a/src/rmd_cache_audio.c +++ b/src/rmd_cache_audio.c @@ -60,14 +60,14 @@ void *rmdCacheAudioBuffer(ProgData *pdata) //insignificant fraction. while (pdata->running) { - SndBuffer *buff = NULL; - pthread_mutex_lock(&pdata->pause_mutex); while (pdata->paused) pthread_cond_wait(&pdata->pause_cond, &pdata->pause_mutex); pthread_mutex_unlock(&pdata->pause_mutex); if (!pdata->args.use_jack) { + SndBuffer *buff; + pthread_mutex_lock(&pdata->sound_buffer_mutex); while (!pdata->sound_buffer && pdata->running) pthread_cond_wait(&pdata->sound_data_read, &pdata->sound_buffer_mutex); -- cgit v1.2.3