From c4ef7c324136b2bfb178327b68f92066474e9520 Mon Sep 17 00:00:00 2001 From: Penwywern Date: Mon, 18 Mar 2024 18:10:10 +0100 Subject: [PATCH] docs: Document the audio_active functions and signals --- docs/sphinx/reference-core.rst | 8 ++++++++ docs/sphinx/reference-sources.rst | 17 +++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/reference-core.rst b/docs/sphinx/reference-core.rst index 5d5c65a90..3e55dc94e 100644 --- a/docs/sphinx/reference-core.rst +++ b/docs/sphinx/reference-core.rst @@ -694,6 +694,14 @@ Core OBS Signals Called when a source's volume has changed. +**source_audio_activate** (ptr source) + + Called when a source's audio becomes active. + +**source_audio_deactivate** (ptr source) + + Called when a source's audio becomes inactive. + **source_transition_start** (ptr source) Called when a transition has started its transition. diff --git a/docs/sphinx/reference-sources.rst b/docs/sphinx/reference-sources.rst index ae88ce070..af14d0d46 100644 --- a/docs/sphinx/reference-sources.rst +++ b/docs/sphinx/reference-sources.rst @@ -649,6 +649,14 @@ The following signals are defined for every source type: Called when the audio mixers have changed. +**audio_activate** (ptr source) + + Called when the source's audio becomes active. + +**audio_deactivate** (ptr source) + + Called when the source's audio becomes inactive. + **filter_add** (ptr source, ptr filter) Called when a filter has been added to the source. @@ -709,8 +717,6 @@ The following signals are defined for every source type: Source-specific Signals ----------------------- -The following signals are defined for specific sources only: - **slide_changed** (int index, string path) Called when the source's currently displayed image changes. @@ -1209,6 +1215,13 @@ General Source Functions --------------------- +.. function:: obs_source_set_audio_active(obs_source_t *source, bool active) + obs_source_audio_active(const obs_source_t *source) + + Sets/gets the audio active status (controls whether the source is shown in the mixer). + +--------------------- + .. function:: void obs_source_enum_active_sources(obs_source_t *source, obs_source_enum_proc_t enum_callback, void *param) void obs_source_enum_active_tree(obs_source_t *source, obs_source_enum_proc_t enum_callback, void *param)