Browse Source

docs: Document the audio_active functions and signals

Penwywern 1 year ago
parent
commit
c4ef7c3241
2 changed files with 23 additions and 2 deletions
  1. 8 0
      docs/sphinx/reference-core.rst
  2. 15 2
      docs/sphinx/reference-sources.rst

+ 8 - 0
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.

+ 15 - 2
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)