From 63c510aca1de960ee12d2ee5b83b794c50258b44 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 15 Jul 2020 01:48:07 -0700 Subject: sound: move avd maintenance to point of capture Since the sound capture buffers all sound in newly allocated memory, the "stream time" represented by those buffers can be accounted for immediately upon reading into the buffer. Doing it later in the different threads on the other side of the queue, especially after encoding, is an unnecessary pile of variable capacitance that just makes things less synchronized for zero gain. --- src/rmd_encode_sound_buffer.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/rmd_encode_sound_buffer.c') diff --git a/src/rmd_encode_sound_buffer.c b/src/rmd_encode_sound_buffer.c index 22e4ddc..8a1d3d4 100644 --- a/src/rmd_encode_sound_buffer.c +++ b/src/rmd_encode_sound_buffer.c @@ -127,10 +127,6 @@ void *rmdEncodeSoundBuffer(ProgData *pdata) { } } pthread_mutex_unlock(&pdata->libogg_mutex); - - pthread_mutex_lock(&pdata->avd_mutex); - pdata->avd -= pdata->periodtime; - pthread_mutex_unlock(&pdata->avd_mutex); } pthread_mutex_lock(&pdata->vorbis_lib_mutex); -- cgit v1.2.1