Sound
Sounds, through one player for everyone. Nothing plays while the user has sounds off.
Get it with Api.sound().
play(wav: Array<number>): voidplaySystem(sound: Wraith.Sound.System | Wraith.Sound.SystemName): voidstop(): voidplay(wav: (integer)[])playSystem(sound: Wraith.Sound.System|Wraith.Sound.SystemName)stop()void Play(System.ReadOnlySpan<byte> wav)void PlaySystem(Wraith.Sound.System sound)void Stop()sal::Result<void, Wraith::SoundError> play(std::span<const uint8_t> wav) constvoid playSystem(Wraith::Sound_System sound) constvoid stop() constpub fn play(&self, wav: &[u8]) -> Result<(), wraith::SoundError>pub fn play_system(&self, sound: wraith::SoundSystem)pub fn stop(&self)fn play(self: Wraith.Sound, wav: []const u8) (Wraith.SoundError || rt.Failure)!voidfn playSystem(self: Wraith.Sound, sound: Wraith.Sound.System) voidfn stop(self: Wraith.Sound) voiduint32_t Wraith_Sound_play(Wraith_Sound self, Slice_u8 wav)void Wraith_Sound_playSystem(Wraith_Sound self, Wraith_Sound_System sound)void Wraith_Sound_stop(Wraith_Sound self)A WAV’s bytes, stopping the last sound. Copied first. Any thread.
Fails with SoundError.
playSystem
Section titled “playSystem”Uses Sound.System.
Whatever’s playing, whoever started it.
SoundError
Section titled “SoundError”What can go wrong, besides Cancelled, Unsupported and Gone.
| Code | Error | |
|---|---|---|
| 1 | InvalidSound |
|
| 2 | Failed |
Sound.System
Section titled “Sound.System”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 |
wraith.io · Mods on the Hub · Get Wraith
Made with ♥ by Asgard
