AudioUtilsImpl class
Helper providing direct access to audio playback related resources.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
outputDevice
→ Rx<
DeviceDetails?> -
DeviceDetails of the currently used output device.
final
-
routeChangeStream
→ Stream<
AVAudioSessionRouteChange> -
Returns Stream of AVAudioSessionRouteChanges.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
speaker
→ Rx<
AudioSpeakerKind?> -
AudioSpeakerKind currently used for audio output.
final
Methods
-
acquire(
AudioMode mode, {AudioSpeakerKind? speaker}) → Stream< void> - Acquires and returns the handle for the provided AudioMode.
-
ensureInitialized(
) → void - Ensures the underlying resources are initialized to reduce possible delays when playing once.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
once(
AudioSource sound, {AudioMode? mode = AudioMode.sound}) → Future< void> -
Plays the provided
soundonce. -
play(
AudioSource music, {Duration fade = Duration.zero, AudioMode mode = AudioMode.music}) → StreamSubscription< void> -
Plays the provided
musiclooped with the specifiedfade. -
reconfigure(
{bool force = false, AudioSpeakerKind? preferredSpeaker}) → Future< void> - Configures the current AudioSession to reflect the AudioModes applied.
-
setDefaultSpeaker(
) → Future< void> - Sets the default audio output device as the used one.
-
setOutputDevice(
DeviceDetails device) → Future< void> -
Sets device with
deviceas a currently used output device. -
setSpeaker(
AudioSpeakerKind speaker, {bool force = false}) → Future< void> -
Sets the
speakerto use for audio output. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited