AudioStream
A platform audio stream for playback or recording.
Lifecycle
A stream moves through the following states:
UNINITIALIZED -> OPEN -> STARTING -> STARTED
-> PAUSING -> PAUSED
-> STOPPING -> STOPPED
CLOSING -> CLOSEDCreate a stream via AudioEngine.openStream. The stream starts in the StreamState.OPEN state. Call start to begin audio processing, pause to temporarily halt, stop to end processing, and close to release all resources.
Thread Safety
Stream control methods (start, pause, stop, close) are safe to call from any thread. The write and read methods should be called from a dedicated audio thread or from within an AudioStreamCallback.
A platform audio stream for playback or recording.
Lifecycle
A stream moves through the following states:
UNINITIALIZED -> OPEN -> STARTING -> STARTED
-> PAUSING -> PAUSED
-> STOPPING -> STOPPED
CLOSING -> CLOSEDCreate a stream via AudioEngine.openStream. The stream starts in the StreamState.OPEN state. Call start to begin audio processing, pause to temporarily halt, stop to end processing, and close to release all resources.
Thread Safety
Stream control methods (start, pause, stop, close) are safe to call from any thread. The write and read methods should be called from a dedicated audio thread or from within an AudioStreamCallback.
A platform audio stream for playback or recording.
Lifecycle
A stream moves through the following states:
UNINITIALIZED -> OPEN -> STARTING -> STARTED
-> PAUSING -> PAUSED
-> STOPPING -> STOPPED
CLOSING -> CLOSEDCreate a stream via AudioEngine.openStream. The stream starts in the StreamState.OPEN state. Call start to begin audio processing, pause to temporarily halt, stop to end processing, and close to release all resources.
Thread Safety
Stream control methods (start, pause, stop, close) are safe to call from any thread. The write and read methods should be called from a dedicated audio thread or from within an AudioStreamCallback.
A platform audio stream for playback or recording.
Lifecycle
A stream moves through the following states:
UNINITIALIZED -> OPEN -> STARTING -> STARTED
-> PAUSING -> PAUSED
-> STOPPING -> STOPPED
CLOSING -> CLOSEDCreate a stream via AudioEngine.openStream. The stream starts in the StreamState.OPEN state. Call start to begin audio processing, pause to temporarily halt, stop to end processing, and close to release all resources.
Thread Safety
Stream control methods (start, pause, stop, close) are safe to call from any thread. The write and read methods should be called from a dedicated audio thread or from within an AudioStreamCallback.
A platform audio stream for playback or recording.
Lifecycle
A stream moves through the following states:
UNINITIALIZED -> OPEN -> STARTING -> STARTED
-> PAUSING -> PAUSED
-> STOPPING -> STOPPED
CLOSING -> CLOSEDCreate a stream via AudioEngine.openStream. The stream starts in the StreamState.OPEN state. Call start to begin audio processing, pause to temporarily halt, stop to end processing, and close to release all resources.
Thread Safety
Stream control methods (start, pause, stop, close) are safe to call from any thread. The write and read methods should be called from a dedicated audio thread or from within an AudioStreamCallback.
A platform audio stream for playback or recording.
Lifecycle
A stream moves through the following states:
UNINITIALIZED -> OPEN -> STARTING -> STARTED
-> PAUSING -> PAUSED
-> STOPPING -> STOPPED
CLOSING -> CLOSEDCreate a stream via AudioEngine.openStream. The stream starts in the StreamState.OPEN state. Call start to begin audio processing, pause to temporarily halt, stop to end processing, and close to release all resources.
Thread Safety
Stream control methods (start, pause, stop, close) are safe to call from any thread. The write and read methods should be called from a dedicated audio thread or from within an AudioStreamCallback.
Properties
The configuration used to create this stream.
The configuration used to create this stream.
The configuration used to create this stream.
The configuration used to create this stream.
The configuration used to create this stream.
The configuration used to create this stream.
The effect chain currently attached to this stream, or null if none.
The effect chain currently attached to this stream, or null if none.
The effect chain currently attached to this stream, or null if none.
The effect chain currently attached to this stream, or null if none.
The effect chain currently attached to this stream, or null if none.
The effect chain currently attached to this stream, or null if none.
Current latency measurements for this stream.
Current latency measurements for this stream.
Current latency measurements for this stream.
Current latency measurements for this stream.
Current latency measurements for this stream.
Current latency measurements for this stream.
Current peak audio level from the most recently processed callback buffer.
Current peak audio level from the most recently processed callback buffer.
Current peak audio level from the most recently processed callback buffer.
Current peak audio level from the most recently processed callback buffer.
Current peak audio level from the most recently processed callback buffer.
The current lifecycle state of this stream.
The current lifecycle state of this stream.
The current lifecycle state of this stream.
The current lifecycle state of this stream.
The current lifecycle state of this stream.
The current lifecycle state of this stream.
Functions
Close the stream and release all associated native resources.
Close the stream and release all associated native resources.
Close the stream and release all associated native resources.
Close the stream and release all associated native resources.
Close the stream and release all associated native resources.
Close the stream and release all associated native resources.
Read audio data from an input stream.
Push-model read is not supported on Apple platforms.
Read audio data from an input stream.
Read audio data from an input stream.
Read audio data from an input stream.
Read audio data from an input stream.
Write audio data to an output stream.
Push-model write is not supported on Apple platforms.
Write audio data to an output stream.
Write audio data to an output stream.
Write audio data to an output stream.
Write audio data to an output stream.