libobs: Always render active audio sources when possible

Fixes an issue where audio data would not be popped if they were not
activated/presenting.  This would cause the audio subsystem to
needlessly buffer when they were reactivated again.  Rendering all audio
sources (excuding composite/filter sources) helps ensure that audio data
is always popped and not left to pile up.
This commit is contained in:
jp9000
2016-01-29 23:18:02 -08:00
parent 9e17328392
commit 3988c6d4b6

View File

@@ -347,6 +347,16 @@ bool audio_callback(void *param,
}
}
pthread_mutex_lock(&data->audio_sources_mutex);
source = data->first_audio_source;
while (source) {
push_audio_tree(NULL, source, audio);
source = (struct obs_source*)source->next_audio_source;
}
pthread_mutex_unlock(&data->audio_sources_mutex);
/* ------------------------------------------------ */
/* render audio data */
for (size_t i = 0; i < audio->render_order.num; i++) {