MethodChannelXAudioSink class
Production XAudioSink: ux/audio_sink for commands,
ux/audio_sink/events for drain and state.
- Implemented types
Constructors
- MethodChannelXAudioSink()
- Subscribes to the native event stream on platforms that register a handler for it.
Properties
-
drained
→ Stream<
void> -
Fires each time the queue plays out completely. A broadcast stream;
flush cancels queued audio rather than draining it, so it does not
fire one.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ ValueEmitter<
XAudioSinkState> -
Current lifecycle state, driven by the native sink.
final
- supported → bool
-
Whether this platform has a native sink. Elsewhere enqueue throws
unsupportedand state stays XAudioSinkState.idle.no setteroverride
Methods
-
enqueue(
Int16List samples) → Future< void> -
Appends
samples— mono Int16 at sampleRate — to the playback queue, opening the output on the first chunk. Resolves once the platform holds the chunk.override -
flush(
) → Future< void> -
Silences the output and empties the queue, including chunks enqueued but
not yet handed to the platform. state settles to
XAudioSinkState.idle; no drained event follows.
override
-
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