start

actual fun start()

Start audio processing.

Transitions the stream from StreamState.OPEN or StreamState.PAUSED to StreamState.STARTED. Once started, the AudioStreamCallback.onAudioReady callback will begin firing (if a callback was provided at creation time). On Android, Apple, JVM, and native desktop that callback runs on a worker thread. On JS it runs on the main thread via an AudioWorklet port. On JS, start returns immediately in StreamState.STARTING; StreamState.STARTED is delivered through AudioStreamCallback.onStreamStateChanged after the worklet module loads and, for input streams, getUserMedia.

This method is safe to call from any thread.

Throws

if the stream cannot be started, for example if it is already in the StreamState.STOPPED or StreamState.CLOSED state, or if the native backend reports an error.

if this is an input stream and recording permission is not granted (Android after AudioSessionManager.bind).

actual fun start()

Start audio processing.

Transitions the stream from StreamState.OPEN or StreamState.PAUSED to StreamState.STARTED. Once started, the AudioStreamCallback.onAudioReady callback will begin firing (if a callback was provided at creation time). On Android, Apple, JVM, and native desktop that callback runs on a worker thread. On JS it runs on the main thread via an AudioWorklet port. On JS, start returns immediately in StreamState.STARTING; StreamState.STARTED is delivered through AudioStreamCallback.onStreamStateChanged after the worklet module loads and, for input streams, getUserMedia.

This method is safe to call from any thread.

Throws

if the stream cannot be started, for example if it is already in the StreamState.STOPPED or StreamState.CLOSED state, or if the native backend reports an error.

if this is an input stream and recording permission is not granted (Android after AudioSessionManager.bind).

expect fun start()

Start audio processing.

Transitions the stream from StreamState.OPEN or StreamState.PAUSED to StreamState.STARTED. Once started, the AudioStreamCallback.onAudioReady callback will begin firing (if a callback was provided at creation time). On Android, Apple, JVM, and native desktop that callback runs on a worker thread. On JS it runs on the main thread via an AudioWorklet port. On JS, start returns immediately in StreamState.STARTING; StreamState.STARTED is delivered through AudioStreamCallback.onStreamStateChanged after the worklet module loads and, for input streams, getUserMedia.

This method is safe to call from any thread.

Throws

if the stream cannot be started, for example if it is already in the StreamState.STOPPED or StreamState.CLOSED state, or if the native backend reports an error.

if this is an input stream and recording permission is not granted (Android after AudioSessionManager.bind).

actual fun start()

Start audio processing.

Transitions the stream from StreamState.OPEN or StreamState.PAUSED to StreamState.STARTED. Once started, the AudioStreamCallback.onAudioReady callback will begin firing (if a callback was provided at creation time). On Android, Apple, JVM, and native desktop that callback runs on a worker thread. On JS it runs on the main thread via an AudioWorklet port. On JS, start returns immediately in StreamState.STARTING; StreamState.STARTED is delivered through AudioStreamCallback.onStreamStateChanged after the worklet module loads and, for input streams, getUserMedia.

This method is safe to call from any thread.

Throws

if the stream cannot be started, for example if it is already in the StreamState.STOPPED or StreamState.CLOSED state, or if the native backend reports an error.

if this is an input stream and recording permission is not granted (Android after AudioSessionManager.bind).

actual fun start()

Start audio processing.

Transitions the stream from StreamState.OPEN or StreamState.PAUSED to StreamState.STARTED. Once started, the AudioStreamCallback.onAudioReady callback will begin firing (if a callback was provided at creation time). On Android, Apple, JVM, and native desktop that callback runs on a worker thread. On JS it runs on the main thread via an AudioWorklet port. On JS, start returns immediately in StreamState.STARTING; StreamState.STARTED is delivered through AudioStreamCallback.onStreamStateChanged after the worklet module loads and, for input streams, getUserMedia.

This method is safe to call from any thread.

Throws

if the stream cannot be started, for example if it is already in the StreamState.STOPPED or StreamState.CLOSED state, or if the native backend reports an error.

if this is an input stream and recording permission is not granted (Android after AudioSessionManager.bind).

actual fun start()

Start audio processing.

Transitions the stream from StreamState.OPEN or StreamState.PAUSED to StreamState.STARTED. Once started, the AudioStreamCallback.onAudioReady callback will begin firing (if a callback was provided at creation time). On Android, Apple, JVM, and native desktop that callback runs on a worker thread. On JS it runs on the main thread via an AudioWorklet port. On JS, start returns immediately in StreamState.STARTING; StreamState.STARTED is delivered through AudioStreamCallback.onStreamStateChanged after the worklet module loads and, for input streams, getUserMedia.

This method is safe to call from any thread.

Throws

if the stream cannot be started, for example if it is already in the StreamState.STOPPED or StreamState.CLOSED state, or if the native backend reports an error.

if this is an input stream and recording permission is not granted (Android after AudioSessionManager.bind).