MethodChannelXAudioCapture class
Production XAudioCapture: ux/audio_capture for commands,
ux/audio_capture/events for frames and state.
- Implemented types
Constructors
- MethodChannelXAudioCapture()
- Subscribes to the native event stream on platforms that register a handler for it.
Properties
-
frames
→ Stream<
XAudioFrame> -
Captured audio, from start until capture stops. A broadcast stream:
subscribing does not itself start capture.
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<
XAudioCaptureState> -
Current lifecycle state, driven by the native tap.
final
- supported → bool
-
Whether this platform has a native tap. Elsewhere start throws
unsupportedand state stays XAudioCaptureState.idle.no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sources(
) → Future< List< XAudioSource> > -
What this host can tap right now: the hardware inputs the OS names,
plus device playback where the platform taps it — macOS, and Android 10
and newer in an app whose pubspec sets
ux: enable_media_projection: true. iOS lists microphones alone. Empty where supported is false.override -
start(
{String? sourceId, bool voiceProcessing = true}) → Future< void> -
Opens
sourceId, or the system's default microphone when it is null, requesting permission if it has not been granted. Returns once frames are flowing; a second call while running does nothing, whateversourceIdit names.override -
stop(
) → Future< void> -
Closes the tap. Does nothing when already idle. state settles to
XAudioCaptureState.idle behind the frames already in flight, so it
can still read XAudioCaptureState.running as this returns.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited