PlaybackDevice class
A playback device.
- Inheritance
-
- Object
- AudioDevice
- PlaybackDevice
Properties
- availableReadFrames → int
-
Available buffered frame count of the device.
This value can be changed when isStarted flag is true.
no setterinherited
- availableWriteFrames → int
-
Available writable frame count of the device.
This value can be changed when isStarted flag is true.
no setterinherited
- bufferFrameSize → int
-
The device's internal buffer frame size.
latefinalinherited
- context → AudioDeviceContext
-
Current device context for this instance.
finalinherited
- deviceInfo → AudioDeviceInfo?
-
Get the current device information.
You can listen the
notificationStream
to detect device changes. When no device is specified while constructing the instance, this method returns null.no setterinherited - format → AudioFormat
-
The device's format.
If the device supports format natively, no conversion will occurs.
Otherwise, miniaudio will try to convert the format.
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Whether this resource is already disposed.
no setterinherited
- isStarted → bool
-
A flag indicates the device is started or not.
no setterinherited
-
notification
→ Stream<
AudioDeviceNotification> -
The device's notification stream.
Use this stream to detecting route and lifecycle changes.
latefinalinherited
- resourceId → int
-
The unique identifier of this resource.
latefinalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → AudioDeviceState
-
The current state of the device.
no setterinherited
- type → AudioDeviceType
-
The device's type.
latefinalinherited
- volume ↔ double
-
The current volume of the device.
getter/setter pairinherited
Methods
-
clearBuffer(
) → void -
Clear the internal buffer.
inherited
-
clearResourceFinalizer(
) → void -
Clears the finalizer for this resource.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setResourceFinalizer<
T> (void onFinalize()) → void -
Sets a finalizer for this resource.
inherited
-
start(
) → void -
Start the audio device.
inherited
-
stop(
{bool clearBuffer = true}) → void -
Stop the audio device.
When
clearBuffer
is set to true, internal buffer will be cleared automatically (true by default).inherited -
throwIfDisposed(
) → void -
Throws an AudioResourceDisposedException if this resource is already disposed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
AudioBuffer buffer) → PlaybackDeviceWriteResult -
Write the
buffer
data to device's internal buffer. If you write frames greater than availableWriteFrames, overflowed frames will be ignored and not written.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited