#include <AudioStreamCallback.h>
AudioStreamCallback defines a callback interface for:
1) moving data to/from an audio stream using onAudioReady
2) being alerted when a stream has an error using onError*
methods
◆ onAudioReady()
A buffer is ready for processing.
- Parameters
-
oboeStream | pointer to the associated stream |
audioData | buffer containing input data or a place to put output data |
numFrames | number of frames to be processed |
- Returns
- DataCallbackResult::Continue or DataCallbackResult::Stop
◆ onErrorAfterClose()
virtual void oboe::AudioStreamCallback::onErrorAfterClose |
( |
AudioStream * |
oboeStream, |
|
|
Result |
error |
|
) |
| |
|
inlinevirtual |
This will be called when an error occurs on a stream or when the stream is disconnected. The underlying stream will already be stopped AND closed by Oboe. So the underlyng stream cannot be referenced.
This callback could be used to reopen a new stream on another device.
- Parameters
-
oboeStream | pointer to the associated stream |
error | |
◆ onErrorBeforeClose()
virtual void oboe::AudioStreamCallback::onErrorBeforeClose |
( |
AudioStream * |
oboeStream, |
|
|
Result |
error |
|
) |
| |
|
inlinevirtual |
This will be called when an error occurs on a stream or when the stream is discomnnected. The underlying stream will already be stopped by Oboe but not yet closed. So the stream can be queried.
- Parameters
-
oboeStream | pointer to the associated stream |
error | |
The documentation for this class was generated from the following file: