libobs: Do not use signals with audio capture/controls
(Note: This commit also modifies UI) Instead of using signals, use designated callback lists for audio capture and audio control helpers. Signals aren't suitable here due to the fact that signals aren't meant for things that happen every frame or things that happen every time audio/video is received. Also prevents audio from being allocated every time these functions are called due to the calldata structure.
This commit is contained in:
@@ -844,6 +844,14 @@ EXPORT uint64_t obs_source_get_push_to_talk_delay(obs_source_t *source);
|
||||
EXPORT void obs_source_set_push_to_talk_delay(obs_source_t *source,
|
||||
uint64_t delay);
|
||||
|
||||
typedef void (*obs_source_audio_capture_t)(void *param, obs_source_t *source,
|
||||
const struct audio_data *audio_data, bool muted);
|
||||
|
||||
EXPORT void obs_source_add_audio_capture_callback(obs_source_t *source,
|
||||
obs_source_audio_capture_t callback, void *param);
|
||||
EXPORT void obs_source_remove_audio_capture_callback(obs_source_t *source,
|
||||
obs_source_audio_capture_t callback, void *param);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Functions used by sources */
|
||||
|
||||
|
Reference in New Issue
Block a user