SoundPlayingService class abstract Sound

High-level static API for playing sounds and TTS through the SDK.

This class exposes only static members and acts as a thin bridge to the native sound engine. Use SoundPlayingListener to observe playback lifecycle events, and SoundPlayingPreferences to configure per-severity playback settings.

Constructors

SoundPlayingService()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

audioLowLatencyOutputFrameSize → Future<int>
Get the audio low-latency output frame size (Android only).
no setter
audioOutput ↔ AudioOutput
Returns the currently selected audio output type.
getter/setter pair
callTimingDelay ↔ int
Returns the current call timing delay (milliseconds).
getter/setter pair
canPlaySounds ↔ bool
Returns whether automatic playback of TTS instructions is enabled.
getter/setter pair
nativeOutputSampleRate → Future<int>
Get the native audio output sample rate (Android only).
no setter
soundPlayingListener → SoundPlayingListener
Obtain the singleton SoundPlayingListener used to observe playback events.
no setter
soundSessionRequestPreferences ↔ SoundSessionRequestPreferences
Return the currently configured sound session request preferences.
getter/setter pair
ttsDefaultLanguage → Language
Return the Language currently being used in the system as the default TTS language.
no setter
voiceVolume ↔ int
Returns the current voice (TTS) volume.
getter/setter pair
warningsVolume ↔ int
Returns the current warnings volume.
getter/setter pair

Static Methods

cancelNavigationSoundsPlaying() → void
Cancel currently playing navigation sounds.
getSoundPlayingPreferences({AlertSeverity severity = AlertSeverity.information}) → SoundPlayingPreferences
Retrieve sound playback preferences for the given severity.
playSound(dynamic soundId) → void
Play a pre-recorded sound by id.
playText(String text, {AlertSeverity severity = AlertSeverity.information}) → Future<void>
Play the given text using TTS.
setSoundPlayingPreferences(SoundPlayingPreferences soundPlayingPreferences, {AlertSeverity severity = AlertSeverity.information}) → void
Apply sound playback preferences for the given severity.