pub enum Error {
Show 16 variants
Unknown(i32),
Disconnected,
IllegalArgument,
InvalidState,
InvalidHandle,
Unimplemented,
Unavailable,
NoFreeHandles,
NoMemory,
Null,
Timeout,
WouldBlock,
InvalidFormat,
OutOfRange,
NoService,
InvalidRate,
}Expand description
These values are returned from AAudio functions to indicate failure.
Variants§
Unknown(i32)
AAudio returned error code that is not a part of this enum
Disconnected
The audio device was disconnected. This could occur, for example, when headphones are plugged in or unplugged. The stream cannot be used after the device is disconnected. Applications should stop and close the stream. If this error is received in an error callback then another thread should be used to stop and close the stream.
IllegalArgument
An invalid parameter was passed to AAudio.
InvalidState
The requested operation is not appropriate for the current state of AAudio.
InvalidHandle
The server rejected the handle used to identify the stream.
Unimplemented
The function is not implemented for this stream.
A resource or information is unavailable. This could occur when an application tries to open too many streams, or a timestamp is not available.
NoFreeHandles
Memory could not be allocated.
NoMemory
Memory could not be allocated.
Null
A NULL pointer was passed to AAudio. Or a NULL pointer was detected internally.
Timeout
An operation took longer than expected.
WouldBlock
InvalidFormat
The requested data format is not supported.
OutOfRange
A requested was out of range.
NoService
The audio service was not available.
InvalidRate
The requested sample rate was not supported.