PerformanceMode

Hint to the platform about the desired trade-off between audio latency and power consumption.

This is a hint -- the platform may not honor the request if the hardware or current system state does not support it. The actual latency achieved can be queried via AudioStream.latencyInfo after the stream is started.

Choosing a Mode

ModeUse case
LOW_LATENCYLive audio, instruments, real-time effects
POWER_SAVINGBackground music, long-running playback
NONENo preference; let the platform decide

See also

Entries

Link copied to clipboard

No specific performance mode requested.

Link copied to clipboard

Minimize audio latency at the expense of increased power consumption.

Link copied to clipboard

Minimize power consumption at the expense of increased audio latency.

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.