StreamState

Lifecycle state of an AudioStream.

A stream progresses through these states as the application calls control methods on it. The typical happy-path lifecycle is:

UNINITIALIZED -> OPEN -> STARTING -> STARTED
-> PAUSING -> PAUSED -> STARTING -> STARTED
-> STOPPING -> STOPPED -> CLOSING -> CLOSED

Transitional states (STARTING, PAUSING, STOPPING, CLOSING) are short-lived and indicate that the platform is processing the requested state change. You can observe transitions via AudioStreamCallback.onStreamStateChanged.

See also

Entries

Link copied to clipboard

The stream has not been initialized yet.

Link copied to clipboard

The stream has been created and configured but is not yet processing audio.

Link copied to clipboard

The stream is transitioning to the STARTED state.

Link copied to clipboard

The stream is actively processing audio.

Link copied to clipboard

The stream is transitioning from STARTED to PAUSED.

Link copied to clipboard

Audio processing is temporarily suspended.

Link copied to clipboard

The stream is transitioning from STARTED or PAUSED to STOPPED.

Link copied to clipboard

Audio processing has ended.

Link copied to clipboard

The stream is transitioning to the CLOSED state.

Link copied to clipboard

The stream has been closed and all resources have been released.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.