Skip to main content

Audio Manager

To play sounds or set the system volume you need to use SmartifyOS.Audio.

AudioManager

audioConfig_SO

The AudioConfig_SO ScriptableObject.

PlaySound

public void PlaySound(AudioClip audioClip)

Lets you play any audio clip.

SetSystemVolumeWithOverlay

public async Task SetSystemVolumeWithOverlay(float volume)

Sets the system output volume in percentage with an UI overlay, useful for external audio control like a hardware audio control nob.

SetSystemVolume

public async Task SetSystemVolume(float volume)

Sets the system output volume in percentage

GetSystemVolume

public float GetSystemVolume()

Returns the system output volume in percentage.