IAudioApi
Interface
Members
4
PlaySfxAsync
method
Plays a sound-effect clip from the local sound bank, addressed by its alias. An unknown alias or a clip on cooldown is a logged no-op. volume overrides the clip's default level for this play only (clamped to 0..1); null uses the clip's configured default.Task PlaySfxAsync(string alias, float? volume = default, CancellationToken cancellationToken = default)SetChannelVolumeAsync
method
Sets a channel's volume, applied live to any in-flight playback on that channel and persisted as a mix preference. volume is clamped to 0..1. All is not a valid target (use the master mute) and no-ops.Task SetChannelVolumeAsync(AudioChannel channel, float volume, CancellationToken cancellationToken = default)SpeakAsync
method
Speaks text through the configured text-to-speech voice on the TTS channel. Sanitization (when enabled), the per-utterance length cap, and the bounded serial queue are applied by the engine. voice overrides the default voice parameters for this utterance only; null uses the configured defaults. Blank text no-ops.Task SpeakAsync(string text, TtsOverride voice = default, CancellationToken cancellationToken = default)StopAsync
method
Stops in-flight playback (and clears the TTS queue) for the given channel, or for every channel when All (the default).Task StopAsync(AudioChannel channel = default, CancellationToken cancellationToken = default)
