CaptureMirrorReader class
Reads the mirror. One instance per capture; SINGLE CONSUMER by contract — the producer's cursor protocol is SPSC and two readers would both advance the read cursor, each stealing frames the other already claimed.
Constructors
- CaptureMirrorReader({required Uint32List header, required Float32List samples, required int capacityFrames, required int channels})
Properties
- capacityFrames → int
-
final
- channels → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Uint32List
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- samples → Float32List
-
final
Methods
-
available(
int writeCursor) → int - Frames currently readable, given a write cursor read atomically by the caller. Unsigned wrap-safe: both cursors are monotonic frame counts, so their difference stays correct across a 2^32 wrap and there is no ambiguous full-vs-empty state to disambiguate with a loop flag.
-
drain(
int writeCursor, {int? maxFrames}) → MirrorDrain - Copy out everything readable and advance the read cursor.
-
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