summaryrefslogtreecommitdiff
path: root/src/rmd_cache_audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rmd_cache_audio.c')
-rw-r--r--src/rmd_cache_audio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rmd_cache_audio.c b/src/rmd_cache_audio.c
index 0ac011f..0a3be39 100644
--- a/src/rmd_cache_audio.c
+++ b/src/rmd_cache_audio.c
@@ -99,7 +99,10 @@ void *rmdCacheSoundBuffer(ProgData *pdata) {
fwrite(jackbuf, 1, write_size, pdata->cache_data->afp);
#endif
}
+
+ pthread_mutex_lock(&pdata->avd_mutex);
pdata->avd -= pdata->periodtime;
+ pthread_mutex_unlock(&pdata->avd_mutex);
}
fclose(pdata->cache_data->afp);
© All Rights Reserved