Skip to content

Sound

Sounds, through one player for everyone. Nothing plays while the user has sounds off.

Get it with Api.sound().

play(wav: Array<number>): void
playSystem(sound: Wraith.Sound.System | Wraith.Sound.SystemName): void
stop(): void

A WAV’s bytes, stopping the last sound. Copied first. Any thread.

Fails with SoundError.

Uses Sound.System.

Whatever’s playing, whoever started it.

What can go wrong, besides Cancelled, Unsupported and Gone.

Code Error
1 InvalidSound
2 Failed

Windows’ own sounds, as the user set them up.

An enum of u8.

Value Name
0 default
1 info
2 warning
3 error
4 question
5 notification

Made with ♥ by Asgard