Skip to content

Desuq Cafe

Documentation menu

Audio

This guide covers basic audio control (mute/volume), advanced audio control (balance, sync offset, monitoring, multi-track routing, special inputs), and real-time volume meters used for voice-activity detection.

Audio Control

FunctionDescription
SetInputMute(Name, Muted)Mute/unmute an input
ToggleInputMute(Name)Toggle mute state
GetInputMute(Name)Fetch current mute state
SetInputVolume(Name, VolumeDb)Set volume in decibels
SetInputVolumeMultiplier(Name, VolumeMul)Set volume as multiplier (0.0 to 1.0+)
GetInputVolume(Name)Fetch current volume
AdjustInputVolume(Name, DeltaDb)Adjust volume relatively
GetInputList()Refresh input list from OBS
GetCachedInputs()Get locally cached input list

Advanced Audio Control

FunctionDescription
GetInputAudioBalance(Name)Fetch stereo balance (async)
SetInputAudioBalance(Name, Balance)Set stereo pan (0.0=left, 0.5=center, 1.0=right)
GetInputAudioSyncOffset(Name)Fetch sync offset in ms (async)
SetInputAudioSyncOffset(Name, OffsetMs)Set sync offset (-950 to 20000ms)
GetInputAudioMonitorType(Name)Fetch monitor type (async)
SetInputAudioMonitorType(Name, Type)Set monitor type
GetInputAudioTracks(Name)Fetch track routing states (async)
SetInputAudioTracks(Name, Tracks)Set all track states (1-6)
SetInputAudioTrack(Name, Track, Enabled)Set single track state
GetSpecialInputs()Fetch default audio devices
GetCachedSpecialInputs()Get cached special inputs
RefreshAllAdvancedAudioInfo()Fetch all advanced audio info for cached inputs

Audio balance:

  • 0.0 = Full Left
  • 0.5 = Center (default)
  • 1.0 = Full Right

Sync offset:

  • Range: -950 to 20000 ms
  • Negative values = audio plays earlier (compensates for processing delay)

Monitor types (EOBSMonitorType):

ValueDescription
NoneNo monitoring (default)
MonitorOnlyHear in OBS but NOT in stream/recording
MonitorAndOutputHear in OBS AND in stream/recording

Audio tracks:

  • Tracks 1 to 6 can be independently enabled/disabled.
  • Used for multi-track recording (separate game/mic/Discord audio).
  • Configure output tracks in OBS Settings → Output → Recording.

Volume Meters & Voice Activity

Real-time per-input audio levels. This is a high-frequency event and is off by default, so opt in only when you need it.

Function / EventDescription
SetVolumeMetersEnabled(bEnable)Opt into the InputVolumeMeters event (per-input, multi-channel levels)
OnInputVolumeMetersFires with an FOBSInputVolumeMeter per input, providing linear multiplier and derived dB, plus a convenience loudest-channel peak
GetClient()->GetAudio()->GetLastVolumeMeters()Poll the most recent meter frame instead of binding the event
SetInputActiveStateEventsEnabled(bEnable) + OnInputActiveStateChangedAn input’s video-active state changed

For ready-made talking/idle detection built on these meters, see Voice Activity Detection.

Note: OBS reports empty levels for a muted input.

Audio / Inputs Events

  • OnInputMuteStateChanged(InputName, bMuted): Input mute changed
  • OnInputVolumeChanged(InputName, VolumeDb, VolumeMul): Volume changed
  • OnInputAudioBalanceChanged(InputName, InputUuid, Balance): Stereo balance changed
  • OnInputAudioSyncOffsetChanged(InputName, InputUuid, SyncOffsetMs): Sync offset changed
  • OnInputAudioTracksChanged(InputName, InputUuid, AudioTracks): Track routing changed
  • OnInputAudioMonitorTypeChanged(InputName, InputUuid, MonitorType): Monitor type changed
  • OnSpecialInputsReceived(SpecialInputs): Default audio devices fetched
  • OnInputSettingsChanged(InputName, InputUuid): Input settings were modified (notification only)
  • OnInputSettingsReceived(InputName, InputKind, Settings): Input settings data fetched (with full data)
  • OnInputListUpdated: Input list was refreshed
  • OnInputCreated(InputName, InputUuid, InputKind, UnversionedInputKind): New input created
  • OnInputRemoved(InputName, InputUuid): Input was removed
  • OnInputNameChanged(InputUuid, OldInputName, NewInputName): Input was renamed
  • OnInputKindListReceived(InputKinds): Available input kinds fetched

For the full catalog of events across every OBS domain, see the Events reference.