Skip to content

Audio ​

class in OpalScript

Play authored sound and music assets during Play.

Methods ​

MemberDescription
Audio.PlayPlay an authored sound asset at volume 0–2. Playback loads asynchronously.
Audio.PlayAtPlay a sound with volume 0–2, pan −1–1, and positive playback pitch.
Audio.PlayMusicPlay a looping music asset at volume 0–2. Reusing the current asset adjusts volume without restarting.
Audio.StopSoundsStop all sound effects; music uses a separate channel.
Audio.StopMusicStop the music channel.
Audio.SetMasterVolumeSet master volume from 0 to 1.
Audio.SetMusicVolumeSet music bus volume from 0 to 1.

See also ​