Settings Audio
Manages audio settings including provider selection and per-channel volume control.
Manages audio settings including provider selection and per-channel volume control.
Overview
Extension: core_settings_audio - Provides option helpers for the audio settings UI. Handles SFX provider/device creation and exposes volume controls for all audio channels (Master, Power, Transmission, Music, UI, etc.).
Public Functions
| Function | Description |
|---|---|
M.getOptions() | Returns the audioOptions table with all audio option helpers |
M.restoreDefaults() | Resets all audio channel volumes to factory defaults |
M.buildOptionHelpers() | Builds and returns the table of audio option get/set/getModes helpers |
M.onFirstUpdateSettings(data) | Called on first settings update; creates the audio provider device |
M.switchOutputDevice(index) | Switches FMOD output device by index |
Audio Option Keys
Each key in the options table provides get(), set(value), and optionally getModes():
| Option Key | Channel / Purpose |
|---|---|
AudioProvider | SFX provider name (e.g. FMOD) |
AudioMasterVol | Master volume (0–1) |
AudioPowerVol | Engine power volume |
AudioForcedInductionVol | Turbo / supercharger volume |
AudioTransmissionVol | Gearbox volume |
AudioSuspensionVol | Suspension sounds |
AudioSurfaceVol | Tire surface sounds |
AudioCollisionVol | Collision / crash sounds |
AudioAeroVol | Wind / aero sounds |
AudioEnvironmentVol | Ambient environment |
AudioMusicVol | Background music |
AudioUiVol | UI sound effects |
AudioOtherVol | Miscellaneous sounds |
AudioLfeVol | Low-frequency effects (subwoofer) |
AudioIntercomVol | Rally intercom |
AudioEnableStereoHeadphones | Headphone mode toggle (triggers bank hot-loading) |
Usage Examples
-- Get current master volume
local vol = settings.getValue('AudioMasterVol')
-- Restore all audio to defaults
core_settings_audio.restoreDefaults()
-- Switch FMOD output device
core_settings_audio.switchOutputDevice(2)Default Volume Values
| Channel | Default |
|---|---|
| Master | 1.0 |
| Power, ForcedInduction, Transmission, Suspension, Surface, Collision, Aero, Environment, Music, UI, Other, Intercom | 0.8 |
| LFE | 0.5 |
See Also
Virtual Input
Creates and manages virtual input devices (joysticks/gamepads) from Lua. Used by the remote controller extension and other systems that need to inject synthetic input events.
Settings Graphic
Manages all graphics settings: display mode, resolution, refresh rate, GPU selection, quality presets, reflections, mirrors, post-processing effects, and more.