write
Write audio data to an output stream.
This method is used in blocking I/O mode (when no AudioStreamCallback was provided). The samples in data are interleaved by channel: for stereo, the layout is [L0, R0, L1, R1, ...].
Return
The number of frames actually written. On Android a negative value is an Oboe error code.
Parameters
Float array containing interleaved audio samples to write. The array must contain at least numFrames * channelCount elements.
Number of frames to write. One frame contains one sample per channel.
Maximum time to wait in nanoseconds for buffer space to become available. Use 0 for non-blocking behavior; Long.MAX_VALUE to block indefinitely. Ignored on JS (cannot block the main thread).
Throws
if push-mode I/O is not supported (Apple, JVM, Linux/Windows native) or if this stream's direction is StreamDirection.INPUT.
if the stream is closed.
Push-model write is not supported on Apple platforms.
Apple's AVAudioEngine uses a pull-model via render callbacks (AVAudioSourceNode). Use AudioStreamCallback.onAudioReady instead.
Throws
always.
Write audio data to an output stream.
This method is used in blocking I/O mode (when no AudioStreamCallback was provided). The samples in data are interleaved by channel: for stereo, the layout is [L0, R0, L1, R1, ...].
Return
The number of frames actually written. On Android a negative value is an Oboe error code.
Parameters
Float array containing interleaved audio samples to write. The array must contain at least numFrames * channelCount elements.
Number of frames to write. One frame contains one sample per channel.
Maximum time to wait in nanoseconds for buffer space to become available. Use 0 for non-blocking behavior; Long.MAX_VALUE to block indefinitely. Ignored on JS (cannot block the main thread).
Throws
if push-mode I/O is not supported (Apple, JVM, Linux/Windows native) or if this stream's direction is StreamDirection.INPUT.
if the stream is closed.
Write audio data to an output stream.
This method is used in blocking I/O mode (when no AudioStreamCallback was provided). The samples in data are interleaved by channel: for stereo, the layout is [L0, R0, L1, R1, ...].
Return
The number of frames actually written. On Android a negative value is an Oboe error code.
Parameters
Float array containing interleaved audio samples to write. The array must contain at least numFrames * channelCount elements.
Number of frames to write. One frame contains one sample per channel.
Maximum time to wait in nanoseconds for buffer space to become available. Use 0 for non-blocking behavior; Long.MAX_VALUE to block indefinitely. Ignored on JS (cannot block the main thread).
Throws
if push-mode I/O is not supported (Apple, JVM, Linux/Windows native) or if this stream's direction is StreamDirection.INPUT.
if the stream is closed.
Write audio data to an output stream.
This method is used in blocking I/O mode (when no AudioStreamCallback was provided). The samples in data are interleaved by channel: for stereo, the layout is [L0, R0, L1, R1, ...].
Return
The number of frames actually written. On Android a negative value is an Oboe error code.
Parameters
Float array containing interleaved audio samples to write. The array must contain at least numFrames * channelCount elements.
Number of frames to write. One frame contains one sample per channel.
Maximum time to wait in nanoseconds for buffer space to become available. Use 0 for non-blocking behavior; Long.MAX_VALUE to block indefinitely. Ignored on JS (cannot block the main thread).
Throws
if push-mode I/O is not supported (Apple, JVM, Linux/Windows native) or if this stream's direction is StreamDirection.INPUT.
if the stream is closed.
Write audio data to an output stream.
This method is used in blocking I/O mode (when no AudioStreamCallback was provided). The samples in data are interleaved by channel: for stereo, the layout is [L0, R0, L1, R1, ...].
Return
The number of frames actually written. On Android a negative value is an Oboe error code.
Parameters
Float array containing interleaved audio samples to write. The array must contain at least numFrames * channelCount elements.
Number of frames to write. One frame contains one sample per channel.
Maximum time to wait in nanoseconds for buffer space to become available. Use 0 for non-blocking behavior; Long.MAX_VALUE to block indefinitely. Ignored on JS (cannot block the main thread).
Throws
if push-mode I/O is not supported (Apple, JVM, Linux/Windows native) or if this stream's direction is StreamDirection.INPUT.
if the stream is closed.