State

sealed class State

Represent current microphone state

Types

Link copied to clipboard
object Disconnected : Microphone.State

Before the MicrophoneMiddleware has been attached it is in the disconnected state. This state is used to indicate that the microphone is not available.

Link copied to clipboard
class Error(val reason: String) : Microphone.State

The microphone has encountered a recoverable error that should be surfaced to the user. The error state is used to give the user an opportunity to retry actions with the microphone.

Link copied to clipboard
object Idle : Microphone.State

The microphone is not currently available to stream audio.

Link copied to clipboard
class Streaming(    val chunkId: Int,     val byteArray: ByteArray,     val bytesRead: Int) : Microphone.State

The microphone is currently streaming audio. Collectively, the streaming states can be concatenated to form an audio file. The consumer of the audio data is able to process this audio data in real-time.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard