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
| Function | Description |
|---|---|
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
| Function | Description |
|---|---|
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 Left0.5= Center (default)1.0= Full Right
Sync offset:
- Range:
-950to20000ms - Negative values = audio plays earlier (compensates for processing delay)
Monitor types (EOBSMonitorType):
| Value | Description |
|---|---|
None | No monitoring (default) |
MonitorOnly | Hear in OBS but NOT in stream/recording |
MonitorAndOutput | Hear 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 / Event | Description |
|---|---|
SetVolumeMetersEnabled(bEnable) | Opt into the InputVolumeMeters event (per-input, multi-channel levels) |
OnInputVolumeMeters | Fires 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) + OnInputActiveStateChanged | An 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 changedOnInputVolumeChanged(InputName, VolumeDb, VolumeMul): Volume changedOnInputAudioBalanceChanged(InputName, InputUuid, Balance): Stereo balance changedOnInputAudioSyncOffsetChanged(InputName, InputUuid, SyncOffsetMs): Sync offset changedOnInputAudioTracksChanged(InputName, InputUuid, AudioTracks): Track routing changedOnInputAudioMonitorTypeChanged(InputName, InputUuid, MonitorType): Monitor type changedOnSpecialInputsReceived(SpecialInputs): Default audio devices fetchedOnInputSettingsChanged(InputName, InputUuid): Input settings were modified (notification only)OnInputSettingsReceived(InputName, InputKind, Settings): Input settings data fetched (with full data)OnInputListUpdated: Input list was refreshedOnInputCreated(InputName, InputUuid, InputKind, UnversionedInputKind): New input createdOnInputRemoved(InputName, InputUuid): Input was removedOnInputNameChanged(InputUuid, OldInputName, NewInputName): Input was renamedOnInputKindListReceived(InputKinds): Available input kinds fetched
For the full catalog of events across every OBS domain, see the Events reference.