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:
@@ -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++) {
|
||||
|
Reference in New Issue
Block a user