diff --git a/docs/reference/_audio_stream_8h_source.html b/docs/reference/_audio_stream_8h_source.html deleted file mode 100644 index 458f30204..000000000 --- a/docs/reference/_audio_stream_8h_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - -
- - - - -
- Oboe
- 1.0
-
- Audio library for Android
- |
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
Enumerations | |
enum | StreamState : aaudio_stream_state_t { + |
enum | StreamState : aaudio_stream_state_t { Uninitialized = AAUDIO_STREAM_STATE_UNINITIALIZED, Unknown = AAUDIO_STREAM_STATE_UNKNOWN, Open = AAUDIO_STREAM_STATE_OPEN, @@ -115,21 +115,21 @@ } |
enum | Direction : aaudio_direction_t { Output = AAUDIO_DIRECTION_OUTPUT, -Input = AAUDIO_DIRECTION_INPUT + |
enum | Direction : aaudio_direction_t { Direction::Output = AAUDIO_DIRECTION_OUTPUT, +Direction::Input = AAUDIO_DIRECTION_INPUT } |
enum | AudioFormat : aaudio_format_t { Invalid = AAUDIO_FORMAT_INVALID, -Unspecified = AAUDIO_FORMAT_UNSPECIFIED, -I16 = AAUDIO_FORMAT_PCM_I16, -Float = AAUDIO_FORMAT_PCM_FLOAT + |
enum | AudioFormat : aaudio_format_t { AudioFormat::Invalid = AAUDIO_FORMAT_INVALID, +Unspecified = AAUDIO_FORMAT_UNSPECIFIED, +AudioFormat::I16 = AAUDIO_FORMAT_PCM_I16, +AudioFormat::Float = AAUDIO_FORMAT_PCM_FLOAT } |
enum | DataCallbackResult : aaudio_data_callback_result_t { Continue = AAUDIO_CALLBACK_RESULT_CONTINUE, + |
enum | DataCallbackResult : aaudio_data_callback_result_t { Continue = AAUDIO_CALLBACK_RESULT_CONTINUE, Stop = AAUDIO_CALLBACK_RESULT_STOP } |
enum | Result : aaudio_result_t { + |
enum | Result : aaudio_result_t { OK, ErrorBase = AAUDIO_ERROR_BASE, ErrorDisconnected = AAUDIO_ERROR_DISCONNECTED, @@ -173,9 +173,9 @@ SharingMode::Shared = AAUDIO_SHARING_MODE_SHARED } |
enum | PerformanceMode : aaudio_performance_mode_t { None = AAUDIO_PERFORMANCE_MODE_NONE, -PowerSaving = AAUDIO_PERFORMANCE_MODE_POWER_SAVING, -LowLatency = AAUDIO_PERFORMANCE_MODE_LOW_LATENCY + |
enum | PerformanceMode : aaudio_performance_mode_t { None = AAUDIO_PERFORMANCE_MODE_NONE, +PerformanceMode::PowerSaving = AAUDIO_PERFORMANCE_MODE_POWER_SAVING, +PerformanceMode::LowLatency = AAUDIO_PERFORMANCE_MODE_LOW_LATENCY } |
enum | AudioApi : int32_t { Unspecified = kUnspecified, @@ -219,13 +219,13 @@ } |
enum | SessionId { None = CONSTANT_API_P(-1, AAUDIO_SESSION_ID_NONE), -None = AAUDIO_PERFORMANCE_MODE_NONE, +None = AAUDIO_PERFORMANCE_MODE_NONE, Allocate = CONSTANT_API_P(0, AAUDIO_SESSION_ID_ALLOCATE) } |
enum | ChannelCount : int32_t { Unspecified = kUnspecified, -Unspecified = AAUDIO_FORMAT_UNSPECIFIED, +Unspecified = AAUDIO_FORMAT_UNSPECIFIED, Unspecified = kUnspecified, Mono = 1, @@ -236,43 +236,34 @@ |
Functions | |
-template<typename T > | |
std::ostream & | operator<< (std::ostream &strm, const ResultWithValue< T > &result) |
template<typename T > | |
std::ostream & | operator<< (std::ostream &strm, const ResultWithValue< T > &result) |
-void | convertFloatToPcm16 (const float *source, int16_t *destination, int32_t numSamples) |
void | convertFloatToPcm16 (const float *source, int16_t *destination, int32_t numSamples) |
-void | convertPcm16ToFloat (const int16_t *source, float *destination, int32_t numSamples) |
void | convertPcm16ToFloat (const int16_t *source, float *destination, int32_t numSamples) |
int32_t | convertFormatToSizeInBytes (AudioFormat format) |
int32_t | convertFormatToSizeInBytes (AudioFormat format) |
template<typename FromType > | |
const char * | convertToText (FromType) |
template<typename FromType > | |
const char * | convertToText (FromType input) |
int | getSdkVersion () |
Variables | |
-constexpr int64_t | kDefaultTimeoutNanos = (2000 * kNanosPerMillisecond) |
constexpr int64_t | kDefaultTimeoutNanos = (2000 * kNanosPerMillisecond) |
-constexpr int32_t | kUnspecified = 0 |
constexpr int32_t | kUnspecified = 0 |
-constexpr int64_t | kNanosPerMicrosecond = 1000 |
constexpr int64_t | kNanosPerMicrosecond = 1000 |
-constexpr int64_t | kNanosPerMillisecond = kNanosPerMicrosecond * 1000 |
constexpr int64_t | kNanosPerMillisecond = kNanosPerMicrosecond * 1000 |
-constexpr int64_t | kMillisPerSecond = 1000 |
constexpr int64_t | kMillisPerSecond = 1000 |
-constexpr int64_t | kNanosPerSecond = kNanosPerMillisecond * kMillisPerSecond |
constexpr int64_t | kNanosPerSecond = kNanosPerMillisecond * kMillisPerSecond |
The underlying audio API used by the audio stream.
Override this to provide a default for when the application did not specify a callback.
+This can be used to adjust the latency of the buffer by changing the threshold where blocking will occur. By combining this with getXRunCount(), the latency can be tuned at run-time for each device.
+This cannot be set higher than getBufferCapacity().
audioData | |
numFrames | |
requestedFrames | requested number of frames that can be filled without blocking |
virtual Result oboe::AudioStream::open | +virtual void oboe::AudioStream::setNativeFormat | ( | -) | +AudioFormat | +format | ) | ++ |
Used to set the format of the underlying stream
+ +
+
-timeoutNanoseconds has been reached. |
virtual ResultWithValue<int32_t> oboe::AudioStream::setBufferSizeInFrames | +virtual Result oboe::AudioStream::stop | ( | -int32_t | -requestedFrames | ) | +int64_t | +timeoutNanoseconds = kDefaultTimeoutNanos | ) |
This can be used to adjust the latency of the buffer by changing the threshold where blocking will occur. By combining this with getXRunCount(), the latency can be tuned at run-time for each device.
-This cannot be set higher than getBufferCapacity().
-requestedFrames | requested number of frames that can be filled without blocking |
Stop the stream. This will block until the stream has been stopped, an error occurs or timeoutNanoseconds
has been reached.
Returns true if the underlying audio API is AAudio.
+virtual Result oboe::AudioStream::waitForStateChange | +virtual Result oboe::AudioStream::waitForStateChange | ( | -StreamState | +StreamState | inputState, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- | StreamState * | +StreamState * | nextState, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
virtual Result oboe::AudioStream::waitForStateTransition | +virtual Result oboe::AudioStream::waitForStateTransition | ( | -StreamState | +StreamState | startingState, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- | StreamState | +StreamState | endingState, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stream | A stream created using OboeStream_Open(). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
buffer | The address of the first sample. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
numFrames | Number of frames to write. Only complete frames will be written. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timeoutNanoseconds | Maximum number of nanoseconds to wait for completion. |
+
|
+ +protected | +
Number of frames which have been read from the stream
+TODO these should be atomic like in AAudio
+ +
+
|
+ +protected | +
Number of frames which have been written into the stream
+TODO these should be atomic like in AAudio
+ +
+
|
+ +protected | +
Do not set directly, use setNativeFormat
TODO: make private These do not change after open.
+This is the complete list of members for oboe::AudioStreamBase, including all inherited members.
AudioStreamBase() (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
AudioStreamBase(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
AudioStreamBase(const AudioStreamBase &)=default | oboe::AudioStreamBase | |
getBufferCapacityInFrames() const | oboe::AudioStreamBase | inlinevirtual |
getBufferSizeInFrames() | oboe::AudioStreamBase | inlinevirtual |
getCallback() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getCallback() const | oboe::AudioStreamBase | inline |
getChannelCount() const | oboe::AudioStreamBase | inline |
getContentType() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDeviceId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getContentType() const | oboe::AudioStreamBase | inline |
getDeviceId() const | oboe::AudioStreamBase | inline |
getDirection() const | oboe::AudioStreamBase | inline |
getFormat() const | oboe::AudioStreamBase | inline |
getFramesPerCallback() const | oboe::AudioStreamBase | inline |
getInputPreset() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getPerformanceMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getInputPreset() const | oboe::AudioStreamBase | inline |
getPerformanceMode() const | oboe::AudioStreamBase | inline |
getSampleRate() const | oboe::AudioStreamBase | inline |
getSessionId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSharingMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getUsage() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
mBufferCapacityInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferSizeInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mChannelCount (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mContentType (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDeviceId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDirection (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFormat (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerBurst (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mInputPreset (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mPerformanceMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSampleRate (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSessionId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSharingMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mStreamCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mUsage (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
operator=(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
getSessionId() const | oboe::AudioStreamBase | inline |
getSharingMode() const | oboe::AudioStreamBase | inline |
getUsage() const | oboe::AudioStreamBase | inline |
mBufferCapacityInFrames | oboe::AudioStreamBase | protected |
mBufferSizeInFrames | oboe::AudioStreamBase | protected |
mChannelCount | oboe::AudioStreamBase | protected |
mContentType | oboe::AudioStreamBase | protected |
mDeviceId | oboe::AudioStreamBase | protected |
mDirection | oboe::AudioStreamBase | protected |
mFormat | oboe::AudioStreamBase | protected |
mFramesPerBurst | oboe::AudioStreamBase | protected |
mFramesPerCallback | oboe::AudioStreamBase | protected |
mInputPreset | oboe::AudioStreamBase | protected |
mPerformanceMode | oboe::AudioStreamBase | protected |
mSampleRate | oboe::AudioStreamBase | protected |
mSessionId | oboe::AudioStreamBase | protected |
mSharingMode | oboe::AudioStreamBase | protected |
mStreamCallback | oboe::AudioStreamBase | protected |
mUsage | oboe::AudioStreamBase | protected |
operator=(const AudioStreamBase &)=default | oboe::AudioStreamBase | |
~AudioStreamBase()=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | virtual |
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
This is the complete list of members for oboe::AudioStreamBase, including all inherited members.
+AudioStreamBase() (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
AudioStreamBase(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
getBufferCapacityInFrames() const | oboe::AudioStreamBase | inlinevirtual |
getBufferSizeInFrames() | oboe::AudioStreamBase | inlinevirtual |
getCallback() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getChannelCount() const | oboe::AudioStreamBase | inline |
getContentType() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDeviceId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDirection() const | oboe::AudioStreamBase | inline |
getFormat() const | oboe::AudioStreamBase | inline |
getFramesPerCallback() const | oboe::AudioStreamBase | inline |
getInputPreset() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getPerformanceMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSampleRate() const | oboe::AudioStreamBase | inline |
getSessionId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSharingMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getUsage() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
mBufferCapacityInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferSizeInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mChannelCount (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mContentType (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDeviceId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDirection (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFormat (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerBurst (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mInputPreset (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mPerformanceMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSampleRate (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSessionId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSharingMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mStreamCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mUsage (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
operator=(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
~AudioStreamBase()=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | virtual |
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
This is the complete list of members for oboe::AudioStreamBase, including all inherited members.
+AudioStreamBase() (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
AudioStreamBase(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
getBufferCapacityInFrames() const | oboe::AudioStreamBase | inlinevirtual |
getBufferSizeInFrames() | oboe::AudioStreamBase | inlinevirtual |
getCallback() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getChannelCount() const | oboe::AudioStreamBase | inline |
getContentType() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDeviceId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDirection() const | oboe::AudioStreamBase | inline |
getFormat() const | oboe::AudioStreamBase | inline |
getFramesPerCallback() const | oboe::AudioStreamBase | inline |
getInputPreset() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getPerformanceMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSampleRate() const | oboe::AudioStreamBase | inline |
getSessionId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSharingMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getUsage() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
mBufferCapacityInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferSizeInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mChannelCount (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mContentType (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDeviceId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDirection (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFormat (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerBurst (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mInputPreset (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mPerformanceMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSampleRate (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSessionId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSharingMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mStreamCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mUsage (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
operator=(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
~AudioStreamBase()=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | virtual |
Public Member Functions | |
- | AudioStreamBase (const AudioStreamBase &)=default |
AudioStreamBase (const AudioStreamBase &)=default | |
-AudioStreamBase & | operator= (const AudioStreamBase &)=default |
AudioStreamBase & | operator= (const AudioStreamBase &)=default |
int | getChannelCount () const |
Direction | getDirection () const |
Direction | getDirection () const |
int32_t | getSampleRate () const |
int | getFramesPerCallback () const |
AudioFormat | getFormat () const |
AudioFormat | getFormat () const |
virtual int32_t | getBufferSizeInFrames () |
virtual int32_t | getBufferCapacityInFrames () const |
-SharingMode | getSharingMode () const |
SharingMode | getSharingMode () const |
-PerformanceMode | getPerformanceMode () const |
PerformanceMode | getPerformanceMode () const |
-int32_t | getDeviceId () const |
int32_t | getDeviceId () const |
-AudioStreamCallback * | getCallback () const |
AudioStreamCallback * | getCallback () const |
-Usage | getUsage () const |
Usage | getUsage () const |
-ContentType | getContentType () const |
ContentType | getContentType () const |
-InputPreset | getInputPreset () const |
InputPreset | getInputPreset () const |
-SessionId | getSessionId () const |
SessionId | getSessionId () const |
Protected Attributes | |
-AudioStreamCallback * | mStreamCallback = nullptr |
AudioStreamCallback * | mStreamCallback = nullptr |
-int32_t | mFramesPerCallback = kUnspecified |
int32_t | mFramesPerCallback = kUnspecified |
-int32_t | mChannelCount = kUnspecified |
int32_t | mChannelCount = kUnspecified |
-int32_t | mSampleRate = kUnspecified |
int32_t | mSampleRate = kUnspecified |
-int32_t | mDeviceId = kUnspecified |
int32_t | mDeviceId = kUnspecified |
-int32_t | mBufferCapacityInFrames = kUnspecified |
int32_t | mBufferCapacityInFrames = kUnspecified |
-int32_t | mBufferSizeInFrames = kUnspecified |
int32_t | mBufferSizeInFrames = kUnspecified |
-int32_t | mFramesPerBurst = kUnspecified |
int32_t | mFramesPerBurst = kUnspecified |
-SharingMode | mSharingMode = SharingMode::Shared |
SharingMode | mSharingMode = SharingMode::Shared |
-AudioFormat | mFormat = AudioFormat::Unspecified |
AudioFormat | mFormat = AudioFormat::Unspecified |
-Direction | mDirection = Direction::Output |
Direction | mDirection = Direction::Output |
-PerformanceMode | mPerformanceMode = PerformanceMode::None |
PerformanceMode | mPerformanceMode = PerformanceMode::None |
-Usage | mUsage = Usage::Media |
Usage | mUsage = Usage::Media |
-ContentType | mContentType = ContentType::Music |
ContentType | mContentType = ContentType::Music |
-InputPreset | mInputPreset = InputPreset::VoiceRecognition |
InputPreset | mInputPreset = InputPreset::VoiceRecognition |
-SessionId | mSessionId = SessionId::None |
SessionId | mSessionId = SessionId::None |
Base class containing parameters for Oboe streams and builders.
-OboeStreamBuilder can return OBOE_UNSPECIFIED or the requested value.
-OboeStream will generally return the actual final value, but getFramesPerCallback() can be unspecified even for a stream.
-Base class containing parameters for audio streams and builders.
+
+
|
+ +default | +
Default copy constructor
+ +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
Direction oboe::AudioStreamBase::getDirection | +Direction oboe::AudioStreamBase::getDirection | ( | ) | const | @@ -292,7 +370,7 @@
AudioFormat oboe::AudioStreamBase::getFormat | +AudioFormat oboe::AudioStreamBase::getFormat | ( | ) | const | @@ -318,7 +396,7 @@
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +default | +
Default assignment operator
+ +
+
|
+ +protected | +
Stream buffer capacity specified as a number of audio frames
+ +
+
|
+ +protected | +
Stream buffer size specified as a number of audio frames
+ +
+
|
+ +protected | +
Stream channel count
+ +
+
|
+ +protected | +
Stream content type. Only active on Android 28+
+ +
+
|
+ +protected | +
Stream audio device ID
+ +
+
|
+ +protected | +
Stream direction
+ +
+
|
+ +protected | +
Format of audio frames
+ +
+
|
+ +protected | +
Number of frames which will be copied to/from the audio device in a single read/write operation
+ +
+
|
+ +protected | +
Number of audio frames which will be requested in each callback
+ +
+
|
+ +protected | +
Stream input preset. Only active on Android 28+
+ +
+
|
+ +protected | +
Stream performance mode
+ +
+
|
+ +protected | +
Stream sample rate
+ +
+
|
+ +protected | +
Stream session ID allocation strategy. Only active on Android 28+
+ +
+
|
+ +protected | +
Stream sharing mode
+ +
+
|
+ +protected | +
The callback which will be fired when new data is ready to be read/written
+ +
+
|
+ +protected | +
Stream usage. Only active on Android 28+
This is the complete list of members for oboe::AudioStreamBuilder, including all inherited members.
AudioStreamBase() (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
AudioStreamBase(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
AudioStreamBase(const AudioStreamBase &)=default | oboe::AudioStreamBase | |
AudioStreamBuilder() (defined in oboe::AudioStreamBuilder) | oboe::AudioStreamBuilder | inline |
getAudioApi() const (defined in oboe::AudioStreamBuilder) | oboe::AudioStreamBuilder | inline |
getAudioApi() const | oboe::AudioStreamBuilder | inline |
getBufferCapacityInFrames() const | oboe::AudioStreamBase | inlinevirtual |
getBufferSizeInFrames() | oboe::AudioStreamBase | inlinevirtual |
getCallback() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getCallback() const | oboe::AudioStreamBase | inline |
getChannelCount() const | oboe::AudioStreamBase | inline |
getContentType() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDeviceId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getContentType() const | oboe::AudioStreamBase | inline |
getDeviceId() const | oboe::AudioStreamBase | inline |
getDirection() const | oboe::AudioStreamBase | inline |
getFormat() const | oboe::AudioStreamBase | inline |
getFramesPerCallback() const | oboe::AudioStreamBase | inline |
getInputPreset() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getPerformanceMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getInputPreset() const | oboe::AudioStreamBase | inline |
getPerformanceMode() const | oboe::AudioStreamBase | inline |
getSampleRate() const | oboe::AudioStreamBase | inline |
getSessionId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSharingMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getUsage() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSessionId() const | oboe::AudioStreamBase | inline |
getSharingMode() const | oboe::AudioStreamBase | inline |
getUsage() const | oboe::AudioStreamBase | inline |
isAAudioRecommended() | oboe::AudioStreamBuilder | static |
isAAudioSupported() | oboe::AudioStreamBuilder | static |
mBufferCapacityInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferSizeInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mChannelCount (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mContentType (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDeviceId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDirection (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFormat (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerBurst (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mInputPreset (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mPerformanceMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSampleRate (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSessionId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSharingMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mStreamCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mUsage (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferCapacityInFrames | oboe::AudioStreamBase | protected |
mBufferSizeInFrames | oboe::AudioStreamBase | protected |
mChannelCount | oboe::AudioStreamBase | protected |
mContentType | oboe::AudioStreamBase | protected |
mDeviceId | oboe::AudioStreamBase | protected |
mDirection | oboe::AudioStreamBase | protected |
mFormat | oboe::AudioStreamBase | protected |
mFramesPerBurst | oboe::AudioStreamBase | protected |
mFramesPerCallback | oboe::AudioStreamBase | protected |
mInputPreset | oboe::AudioStreamBase | protected |
mPerformanceMode | oboe::AudioStreamBase | protected |
mSampleRate | oboe::AudioStreamBase | protected |
mSessionId | oboe::AudioStreamBase | protected |
mSharingMode | oboe::AudioStreamBase | protected |
mStreamCallback | oboe::AudioStreamBase | protected |
mUsage | oboe::AudioStreamBase | protected |
openStream(AudioStream **stream) | oboe::AudioStreamBuilder | |
operator=(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
operator=(const AudioStreamBase &)=default | oboe::AudioStreamBase | |
setAudioApi(AudioApi audioApi) | oboe::AudioStreamBuilder | inline |
setBufferCapacityInFrames(int32_t bufferCapacityInFrames) | oboe::AudioStreamBuilder | inline |
setCallback(AudioStreamCallback *streamCallback) | oboe::AudioStreamBuilder | inline |
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
This is the complete list of members for oboe::AudioStreamBuilder, including all inherited members.
+AudioStreamBase() (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
AudioStreamBase(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
AudioStreamBuilder() (defined in oboe::AudioStreamBuilder) | oboe::AudioStreamBuilder | inline |
getAudioApi() const (defined in oboe::AudioStreamBuilder) | oboe::AudioStreamBuilder | inline |
getBufferCapacityInFrames() const | oboe::AudioStreamBase | inlinevirtual |
getBufferSizeInFrames() | oboe::AudioStreamBase | inlinevirtual |
getCallback() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getChannelCount() const | oboe::AudioStreamBase | inline |
getContentType() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDeviceId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDirection() const | oboe::AudioStreamBase | inline |
getFormat() const | oboe::AudioStreamBase | inline |
getFramesPerCallback() const | oboe::AudioStreamBase | inline |
getInputPreset() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getPerformanceMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSampleRate() const | oboe::AudioStreamBase | inline |
getSessionId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSharingMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getUsage() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
isAAudioRecommended() | oboe::AudioStreamBuilder | static |
isAAudioSupported() | oboe::AudioStreamBuilder | static |
mBufferCapacityInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferSizeInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mChannelCount (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mContentType (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDeviceId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDirection (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFormat (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerBurst (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mInputPreset (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mPerformanceMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSampleRate (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSessionId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSharingMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mStreamCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mUsage (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
openStream(AudioStream **stream) | oboe::AudioStreamBuilder | |
operator=(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
setAudioApi(AudioApi audioApi) | oboe::AudioStreamBuilder | inline |
setBufferCapacityInFrames(int32_t bufferCapacityInFrames) | oboe::AudioStreamBuilder | inline |
setCallback(AudioStreamCallback *streamCallback) | oboe::AudioStreamBuilder | inline |
setChannelCount(int channelCount) | oboe::AudioStreamBuilder | inline |
setContentType(ContentType contentType) | oboe::AudioStreamBuilder | inline |
setDeviceId(int32_t deviceId) | oboe::AudioStreamBuilder | inline |
setDirection(Direction direction) | oboe::AudioStreamBuilder | inline |
setFormat(AudioFormat format) | oboe::AudioStreamBuilder | inline |
setFramesPerCallback(int framesPerCallback) | oboe::AudioStreamBuilder | inline |
setInputPreset(InputPreset inputPreset) | oboe::AudioStreamBuilder | inline |
setPerformanceMode(PerformanceMode performanceMode) | oboe::AudioStreamBuilder | inline |
setSampleRate(int32_t sampleRate) | oboe::AudioStreamBuilder | inline |
setSessionId(SessionId sessionId) | oboe::AudioStreamBuilder | inline |
setSharingMode(SharingMode sharingMode) | oboe::AudioStreamBuilder | inline |
setUsage(Usage usage) | oboe::AudioStreamBuilder | inline |
~AudioStreamBase()=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | virtual |
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
This is the complete list of members for oboe::AudioStreamBuilder, including all inherited members.
+AudioStreamBase() (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
AudioStreamBase(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
AudioStreamBuilder() (defined in oboe::AudioStreamBuilder) | oboe::AudioStreamBuilder | inline |
getAudioApi() const (defined in oboe::AudioStreamBuilder) | oboe::AudioStreamBuilder | inline |
getBufferCapacityInFrames() const | oboe::AudioStreamBase | inlinevirtual |
getBufferSizeInFrames() | oboe::AudioStreamBase | inlinevirtual |
getCallback() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getChannelCount() const | oboe::AudioStreamBase | inline |
getContentType() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDeviceId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDirection() const | oboe::AudioStreamBase | inline |
getFormat() const | oboe::AudioStreamBase | inline |
getFramesPerCallback() const | oboe::AudioStreamBase | inline |
getInputPreset() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getPerformanceMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSampleRate() const | oboe::AudioStreamBase | inline |
getSessionId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSharingMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getUsage() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
isAAudioRecommended() | oboe::AudioStreamBuilder | static |
isAAudioSupported() | oboe::AudioStreamBuilder | static |
mBufferCapacityInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferSizeInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mChannelCount (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mContentType (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDeviceId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDirection (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFormat (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerBurst (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mInputPreset (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mPerformanceMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSampleRate (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSessionId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSharingMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mStreamCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mUsage (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
openStream(AudioStream **stream) | oboe::AudioStreamBuilder | |
operator=(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
setAudioApi(AudioApi audioApi) | oboe::AudioStreamBuilder | inline |
setBufferCapacityInFrames(int32_t bufferCapacityInFrames) | oboe::AudioStreamBuilder | inline |
setCallback(AudioStreamCallback *streamCallback) | oboe::AudioStreamBuilder | inline |
setChannelCount(int channelCount) | oboe::AudioStreamBuilder | inline |
setContentType(ContentType contentType) | oboe::AudioStreamBuilder | inline |
setDeviceId(int32_t deviceId) | oboe::AudioStreamBuilder | inline |
setDirection(Direction direction) | oboe::AudioStreamBuilder | inline |
setFormat(AudioFormat format) | oboe::AudioStreamBuilder | inline |
setFramesPerCallback(int framesPerCallback) | oboe::AudioStreamBuilder | inline |
setInputPreset(InputPreset inputPreset) | oboe::AudioStreamBuilder | inline |
setPerformanceMode(PerformanceMode performanceMode) | oboe::AudioStreamBuilder | inline |
setSampleRate(int32_t sampleRate) | oboe::AudioStreamBuilder | inline |
setSessionId(SessionId sessionId) | oboe::AudioStreamBuilder | inline |
setSharingMode(SharingMode sharingMode) | oboe::AudioStreamBuilder | inline |
setUsage(Usage usage) | oboe::AudioStreamBuilder | inline |
~AudioStreamBase()=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | virtual |
@@ -180,58 +169,69 @@
Additional Inherited MembersAudioStreamCallback * | mStreamCallback = nullptr | int32_t | mFramesPerCallback = kUnspecified | int32_t | mChannelCount = kUnspecified | int32_t | mSampleRate = kUnspecified | int32_t | mDeviceId = kUnspecified | int32_t | mBufferCapacityInFrames = kUnspecified | int32_t | mBufferSizeInFrames = kUnspecified | int32_t | mFramesPerBurst = kUnspecified | SharingMode | mSharingMode = SharingMode::Shared | AudioFormat | mFormat = AudioFormat::Unspecified | Direction | mDirection = Direction::Output | PerformanceMode | mPerformanceMode = PerformanceMode::None | Usage | mUsage = Usage::Media | ContentType | mContentType = ContentType::Music | InputPreset | mInputPreset = InputPreset::VoiceRecognition | SessionId | mSessionId = SessionId::None | | |
Factory class for an audio Stream.
+
|
+ +inline | +
Get the audio API which will be requested when opening the stream. No guarantees that this is the API which will actually be used. Query the stream itself to find out the API which is being used.
+Result oboe::AudioStreamBuilder::openStream | +Result oboe::AudioStreamBuilder::openStream | ( | AudioStream ** | stream | ) | @@ -534,7 +534,7 @@( | -Direction | +Direction | direction | ) |
direction | Direction::Output or Direction::Input |
direction | Direction::Output or Direction::Input |
Request a sample data format, for example Format::Float.
+Request a sample data format, for example Format::Float.
Default is Format::Unspecified. If the value is unspecified then the application should query for the actual value after the stream is opened.
@@ -667,7 +667,7 @@performanceMode | for example, PerformanceMode::LowLatency |
performanceMode | for example, PerformanceMode::LowLatency |
Session IDs from Oboe can be used the Android Java APIs and vice versa. So a session ID from an Oboe stream can be passed to Java and effects applied using the Java AudioEffect API.
Allocated session IDs will always be positive and nonzero.
Added in API level 28.
diff --git a/docs/reference/classoboe_1_1_audio_stream_builder.png b/docs/reference/a00045.png similarity index 100% rename from docs/reference/classoboe_1_1_audio_stream_builder.png rename to docs/reference/a00045.png diff --git a/docs/reference/classoboe_1_1_audio_stream_callback-members.html b/docs/reference/a00046.html similarity index 63% rename from docs/reference/classoboe_1_1_audio_stream_callback-members.html rename to docs/reference/a00046.html index cead2c5b6..de00829ba 100644 --- a/docs/reference/classoboe_1_1_audio_stream_callback-members.html +++ b/docs/reference/a00046.html @@ -63,7 +63,7 @@This is the complete list of members for oboe::AudioStreamCallback, including all inherited members.
+This is the complete list of members for oboe::AudioStreamCallback, including all inherited members.
onAudioReady(AudioStream *oboeStream, void *audioData, int32_t numFrames)=0 | oboe::AudioStreamCallback | pure virtual |
onErrorAfterClose(AudioStream *oboeStream, Result error) | oboe::AudioStreamCallback | inlinevirtual |
onErrorBeforeClose(AudioStream *oboeStream, Result error) | oboe::AudioStreamCallback | inlinevirtual |
~AudioStreamCallback()=default (defined in oboe::AudioStreamCallback) | oboe::AudioStreamCallback | virtual |
onAudioReady(AudioStream *oboeStream, void *audioData, int32_t numFrames)=0 | oboe::AudioStreamCallback | pure virtual |
onErrorAfterClose(AudioStream *oboeStream, Result error) | oboe::AudioStreamCallback | inlinevirtual |
onErrorBeforeClose(AudioStream *oboeStream, Result error) | oboe::AudioStreamCallback | inlinevirtual |
~AudioStreamCallback()=default (defined in oboe::AudioStreamCallback) | oboe::AudioStreamCallback | virtual |
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
This is the complete list of members for oboe::AudioStreamCallback, including all inherited members.
+onAudioReady(AudioStream *oboeStream, void *audioData, int32_t numFrames)=0 | oboe::AudioStreamCallback | pure virtual |
onErrorAfterClose(AudioStream *oboeStream, Result error) | oboe::AudioStreamCallback | inlinevirtual |
onErrorBeforeClose(AudioStream *oboeStream, Result error) | oboe::AudioStreamCallback | inlinevirtual |
~AudioStreamCallback()=default (defined in oboe::AudioStreamCallback) | oboe::AudioStreamCallback | virtual |
#include <AudioStreamCallback.h>
Public Member Functions | |
virtual DataCallbackResult | onAudioReady (AudioStream *oboeStream, void *audioData, int32_t numFrames)=0 |
virtual DataCallbackResult | onAudioReady (AudioStream *oboeStream, void *audioData, int32_t numFrames)=0 |
virtual void | onErrorBeforeClose (AudioStream *oboeStream, Result error) |
virtual void | onErrorBeforeClose (AudioStream *oboeStream, Result error) |
virtual void | onErrorAfterClose (AudioStream *oboeStream, Result error) |
virtual void | onErrorAfterClose (AudioStream *oboeStream, Result error) |
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
virtual DataCallbackResult oboe::AudioStreamCallback::onAudioReady | +virtual DataCallbackResult oboe::AudioStreamCallback::onAudioReady | ( | AudioStream * | oboeStream, | @@ -155,7 +160,7 @@- | Result | +Result | error | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- | Result | +Result | error | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ChannelCount (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
FramesPerBurst (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
ChannelCount | oboe::DefaultStreamValues | static |
FramesPerBurst | oboe::DefaultStreamValues | static |
SampleRate | oboe::DefaultStreamValues | static |
This is the complete list of members for oboe::DefaultStreamValues, including all inherited members.
+This is the complete list of members for oboe::DefaultStreamValues, including all inherited members.
ChannelCount (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
FramesPerBurst (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
SampleRate | oboe::DefaultStreamValues | static |
ChannelCount (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
FramesPerBurst (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
SampleRate (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
This is the complete list of members for oboe::DefaultStreamValues, including all inherited members.
+ChannelCount (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
FramesPerBurst (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
SampleRate (defined in oboe::DefaultStreamValues) | oboe::DefaultStreamValues | static |
#include <Definitions.h>
Static Public Attributes | |
static int32_t | SampleRate |
-static int32_t | FramesPerBurst |
static int32_t | FramesPerBurst |
-static int32_t | ChannelCount |
static int32_t | ChannelCount |
On API 16 to 25 OpenSL ES will be used. When using OpenSL ES the optimal values for sampleRate and framesPerBurst are not known by the native code. On API 17+ these values should be obtained from the AudioManager using this code:
+
+Note that this technique only works for built-in speakers and headphones.
+ AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+ String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
+ int defaultSampleRate = Integer.parseInt(sampleRateStr);
+ String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
+ int defaultFramesPerBurst = Integer.parseInt(framesPerBurstStr);
+
It can then be passed down to Oboe through JNI.
+AAudio will get the optimal framesPerBurst from the HAL and will ignore this value.
+
+
|
+ +static | +
The default channel count to use when opening new audio streams
+ +
+
|
+ +static | +
The default frames per burst to use when opening new audio streams
+ +On API 16 to 25 OpenSL ES will be used. When using OpenSL ES the optimal values for sampleRate and framesPerBurst are not known by the native code. On API 17+ these values should be obtained from the AudioManager using this code:
-
-Note that this technique only works for built-in speakers and headphones.
- AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
- String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
- int defaultSampleRate = Integer.parseInt(sampleRateStr);
- String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
- int defaultFramesPerBurst = Integer.parseInt(framesPerBurstStr);
-
It can then be passed down to Oboe through JNI.
-AAudio will get the optimal framesPerBurst from the HAL and will ignore this value.
+The default sample rate to use when opening new audio streams
This is the complete list of members for oboe::LatencyTuner, including all inherited members.
LatencyTuner(AudioStream &stream) (defined in oboe::LatencyTuner) | oboe::LatencyTuner | explicit |
LatencyTuner(AudioStream &stream) | oboe::LatencyTuner | explicit |
requestReset() | oboe::LatencyTuner | |
tune() | oboe::LatencyTuner |
This is the complete list of members for oboe::LatencyTuner, including all inherited members.
+This is the complete list of members for oboe::LatencyTuner, including all inherited members.
LatencyTuner(AudioStream &stream) (defined in oboe::LatencyTuner) | oboe::LatencyTuner | explicit |
requestReset() | oboe::LatencyTuner | |
tune() | oboe::LatencyTuner | |
LatencyTuner(AudioStream &stream) (defined in oboe::LatencyTuner) | oboe::LatencyTuner | explicit |
requestReset() | oboe::LatencyTuner | |
tune() | oboe::LatencyTuner |
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
This is the complete list of members for oboe::LatencyTuner, including all inherited members.
+LatencyTuner(AudioStream &stream) (defined in oboe::LatencyTuner) | oboe::LatencyTuner | explicit |
requestReset() | oboe::LatencyTuner | |
tune() | oboe::LatencyTuner |
Public Member Functions | |
- | LatencyTuner (AudioStream &stream) |
LatencyTuner (AudioStream &stream) | |
Result | tune () |
Result | tune () |
void | requestReset () |
This can be used to dynamically tune the latency of an output stream. It adjusts the bufferSize based on the number of underruns. The bufferSize is the portion of the total bufferCapacity that is used to store data.
+LatencyTuner can be used to dynamically tune the latency of an output stream. It adjusts the stream's bufferSize by monitoring the number of underruns.
This only affects the latency associated with the first level of buffering that is closest to the application. It does not affect low latency in the HAL, or touch latency in the UI.
Call tune() right before returning from your data callback function if using callbacks. Call tune() right before calling write() if using blocking writes.
If you want to see the ongoing results of this tuning process then call stream->getBufferSize() periodically.
-
+
|
+ +explicit | +
Construct a new LatencyTuner object which will act on the given audio stream
+stream | the stream who's latency will be tuned |
Result oboe::LatencyTuner::tune | +Result oboe::LatencyTuner::tune | ( | ) | diff --git a/docs/reference/a00057.html b/docs/reference/a00057.html index bbbaa51dc..2ae89a740 100644 --- a/docs/reference/a00057.html +++ b/docs/reference/a00057.html @@ -75,13 +75,13 @@ |
createBasedOnSign(T numericResult) | oboe::ResultWithValue< T > | inlinestatic |
error() const (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
error() const | oboe::ResultWithValue< T > | inline |
operator bool() const | oboe::ResultWithValue< T > | inlineexplicit |
operator Result() const | oboe::ResultWithValue< T > | inline |
operator!() const | oboe::ResultWithValue< T > | inline |
ResultWithValue(oboe::Result error) (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
ResultWithValue(T value) (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inlineexplicit |
value() const (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
ResultWithValue(oboe::Result error) | oboe::ResultWithValue< T > | inline |
ResultWithValue(T value) | oboe::ResultWithValue< T > | inlineexplicit |
value() const | oboe::ResultWithValue< T > | inline |
This is the complete list of members for oboe::ResultWithValue< T >, including all inherited members.
+This is the complete list of members for oboe::ResultWithValue< T >, including all inherited members.
createBasedOnSign(T numericResult) | oboe::ResultWithValue< T > | inlinestatic |
error() const (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
operator bool() const | oboe::ResultWithValue< T > | inlineexplicit |
operator Result() const | oboe::ResultWithValue< T > | inline |
operator!() const | oboe::ResultWithValue< T > | inline |
ResultWithValue(oboe::Result error) (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
ResultWithValue(T value) (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inlineexplicit |
value() const (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
createBasedOnSign(T numericResult) | oboe::ResultWithValue< T > | inlinestatic |
error() const (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
operator bool() const | oboe::ResultWithValue< T > | inlineexplicit |
operator Result() const | oboe::ResultWithValue< T > | inline |
operator!() const | oboe::ResultWithValue< T > | inline |
ResultWithValue(oboe::Result error) (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
ResultWithValue(T value) (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inlineexplicit |
value() const (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
This is the complete list of members for oboe::ResultWithValue< T >, including all inherited members.
+createBasedOnSign(T numericResult) | oboe::ResultWithValue< T > | inlinestatic |
error() const (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
operator bool() const | oboe::ResultWithValue< T > | inlineexplicit |
operator Result() const | oboe::ResultWithValue< T > | inline |
operator!() const | oboe::ResultWithValue< T > | inline |
ResultWithValue(oboe::Result error) (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
ResultWithValue(T value) (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inlineexplicit |
value() const (defined in oboe::ResultWithValue< T >) | oboe::ResultWithValue< T > | inline |
#include <ResultWithValue.h>
Public Member Functions | |
- | ResultWithValue (oboe::Result error) |
ResultWithValue (oboe::Result error) | |
- | ResultWithValue (T value) |
ResultWithValue (T value) | |
-oboe::Result | error () const |
oboe::Result | error () const |
-T | value () const |
T | value () const |
operator bool () const | |
static ResultWithValue< T > | createBasedOnSign (T numericResult) |
A ResultWithValue can store both the result of an operation (either OK or an error) and a value.
+It has been designed for cases where the caller needs to know whether an operation succeeded and, if it did, a value which was obtained during the operation.
+For example, when reading from a stream the caller needs to know the result of the read operation and, if it was successful, how many frames were read. Note that ResultWithValue can be evaluated as a boolean so it's simple to check whether the result is OK.
+ ResultWithValue<int32_t> resultOfRead = myStream.read(&buffer, numFrames, timeoutNanoseconds);
if (resultOfRead){ LOGD("Frames read: %d", resultOfRead.value()); } else { LOGD("Error reading from stream: %s", resultOfRead.error()); }
+
|
+ +inline | +
Construct a ResultWithValue containing an error result.
+error | The error |
+
|
+ +inlineexplicit | +
Construct a ResultWithValue containing an OK result and a value.
+value | the value to store |
Create a ResultWithValue from a number. If the number is positive the ResultWithValue will have a result of Result::OK and the value will contain the number. If the number is negative the result will be obtained from the negative number (numeric error codes can be found in AAudio.h) and the value will be null.
+
+
|
+ +inline | +
Get the result.
+oboe::ResultWithValue< T >::operator Result | +oboe::ResultWithValue< T >::operator Result | ( | ) | const | @@ -217,6 +324,34 @@
+
|
+ +inline | +
Get the value
This is the complete list of members for oboe::Version, including all inherited members.
+This is the complete list of members for oboe::Version, including all inherited members.
Major | oboe::Version | static |
Minor | oboe::Version | static |
Number | oboe::Version | static |
Patch | oboe::Version | static |
Text | oboe::Version | static |
Major | oboe::Version | static |
Minor | oboe::Version | static |
Number | oboe::Version | static |
Patch | oboe::Version | static |
Text | oboe::Version | static |
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
This is the complete list of members for oboe::Version, including all inherited members.
+Major | oboe::Version | static |
Minor | oboe::Version | static |
Number | oboe::Version | static |
Patch | oboe::Version | static |
Text | oboe::Version | static |
#include <Version.h>
Static Public Attributes | |
static constexpr uint32_t | Number = OBOE_VERSION_NUMBER |
Oboe versioning object
+Static Public Attributes | |
static constexpr uint8_t | Major = OBOE_VERSION_MAJOR |
static constexpr uint8_t | Major = OBOE_VERSION_MAJOR |
static constexpr uint8_t | Minor = OBOE_VERSION_MINOR |
static constexpr uint8_t | Minor = OBOE_VERSION_MINOR |
static constexpr uint16_t | Patch = OBOE_VERSION_PATCH |
static constexpr uint16_t | Patch = OBOE_VERSION_PATCH |
static constexpr const char * | Text = OBOE_VERSION_TEXT |
static constexpr const char * | Text = OBOE_VERSION_TEXT |
static constexpr uint32_t | Number = OBOE_VERSION_NUMBER |
static constexpr uint32_t | Number = OBOE_VERSION_NUMBER |
Version string in the form MAJOR.MINOR.PATCH.
+Version string in the form MAJOR.MINOR.PATCH.
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
+Static Public Attributes | |
static constexpr uint8_t | Major = OBOE_VERSION_MAJOR |
static constexpr uint8_t | Minor = OBOE_VERSION_MINOR |
static constexpr uint16_t | Patch = OBOE_VERSION_PATCH |
static constexpr const char * | Text = OBOE_VERSION_TEXT |
static constexpr uint32_t | Number = OBOE_VERSION_NUMBER |
+
|
+ +static | +
This is incremented when we make breaking API changes. Based loosely on https://semver.org/.
+ +
+
|
+ +static | +
This is incremented when we add backwards compatible functionality. Or set to zero when MAJOR is incremented.
+ +
+
|
+ +static | +
Integer representation of the current Oboe library version. This will always increase when the version number changes so can be compared using integer comparison.
+ +
+
|
+ +static | +
This is incremented when we make backwards compatible bug fixes. Or set to zero when MINOR is incremented.
+ +
+
|
+ +static | +
Version string in the form MAJOR.MINOR.PATCH.
+ +
- Oboe
- 1.0
-
- Audio library for Android
- |
-
This is the complete list of members for oboe::AudioStream, including all inherited members.
-AudioStream() (defined in oboe::AudioStream) | oboe::AudioStream | inline |
AudioStream(const AudioStreamBuilder &builder) (defined in oboe::AudioStream) | oboe::AudioStream | explicit |
AudioStreamBase() (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
AudioStreamBase(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
calculateLatencyMillis() | oboe::AudioStream | inlinevirtual |
close()=0 | oboe::AudioStream | pure virtual |
fireCallback(void *audioData, int numFrames) (defined in oboe::AudioStream) | oboe::AudioStream | protected |
flush(int64_t timeoutNanoseconds=kDefaultTimeoutNanos) (defined in oboe::AudioStream) | oboe::AudioStream | virtual |
getAudioApi() const =0 | oboe::AudioStream | pure virtual |
getBufferCapacityInFrames() const | oboe::AudioStreamBase | inlinevirtual |
getBufferSizeInFrames() | oboe::AudioStreamBase | inlinevirtual |
getBytesPerFrame() const (defined in oboe::AudioStream) | oboe::AudioStream | inline |
getBytesPerSample() const (defined in oboe::AudioStream) | oboe::AudioStream | |
getCallback() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getChannelCount() const | oboe::AudioStreamBase | inline |
getContentType() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDeviceId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDirection() const | oboe::AudioStreamBase | inline |
getFormat() const | oboe::AudioStreamBase | inline |
getFramesPerBurst()=0 | oboe::AudioStream | pure virtual |
getFramesPerCallback() const | oboe::AudioStreamBase | inline |
getFramesRead() (defined in oboe::AudioStream) | oboe::AudioStream | inlinevirtual |
getFramesWritten() | oboe::AudioStream | inlinevirtual |
getInputPreset() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getPerformanceMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSampleRate() const | oboe::AudioStreamBase | inline |
getSessionId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSharingMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getState()=0 | oboe::AudioStream | pure virtual |
getTimestamp(clockid_t clockId, int64_t *framePosition, int64_t *timeNanoseconds) (defined in oboe::AudioStream) | oboe::AudioStream | inlinevirtual |
getUnderlyingStream() const | oboe::AudioStream | inlinevirtual |
getUsage() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getXRunCount() const | oboe::AudioStream | inlinevirtual |
incrementFramesRead(int32_t frames) (defined in oboe::AudioStream) | oboe::AudioStream | inlineprotectedvirtual |
incrementFramesWritten(int32_t frames) (defined in oboe::AudioStream) | oboe::AudioStream | inlineprotectedvirtual |
isPlaying() (defined in oboe::AudioStream) | oboe::AudioStream | |
isXRunCountSupported() const =0 | oboe::AudioStream | pure virtual |
mBufferCapacityInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferSizeInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mChannelCount (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mContentType (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDeviceId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDirection (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFormat (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerBurst (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesRead (defined in oboe::AudioStream) | oboe::AudioStream | protected |
mFramesWritten (defined in oboe::AudioStream) | oboe::AudioStream | protected |
mInputPreset (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mNativeFormat (defined in oboe::AudioStream) | oboe::AudioStream | protected |
mPerformanceMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSampleRate (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSessionId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSharingMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mStreamCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mUsage (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
onDefaultCallback(void *audioData, int numFrames) | oboe::AudioStream | inlineprotectedvirtual |
open() | oboe::AudioStream | virtual |
operator=(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
pause(int64_t timeoutNanoseconds=kDefaultTimeoutNanos) (defined in oboe::AudioStream) | oboe::AudioStream | virtual |
read(void *buffer, int32_t numFrames, int64_t timeoutNanoseconds) (defined in oboe::AudioStream) | oboe::AudioStream | inlinevirtual |
requestFlush()=0 (defined in oboe::AudioStream) | oboe::AudioStream | pure virtual |
requestPause()=0 (defined in oboe::AudioStream) | oboe::AudioStream | pure virtual |
requestStart()=0 (defined in oboe::AudioStream) | oboe::AudioStream | pure virtual |
requestStop()=0 (defined in oboe::AudioStream) | oboe::AudioStream | pure virtual |
setBufferSizeInFrames(int32_t requestedFrames) | oboe::AudioStream | inlinevirtual |
setNativeFormat(AudioFormat format) (defined in oboe::AudioStream) | oboe::AudioStream | inlineprotectedvirtual |
start(int64_t timeoutNanoseconds=kDefaultTimeoutNanos) (defined in oboe::AudioStream) | oboe::AudioStream | virtual |
stop(int64_t timeoutNanoseconds=kDefaultTimeoutNanos) (defined in oboe::AudioStream) | oboe::AudioStream | virtual |
usesAAudio() const | oboe::AudioStream | inline |
waitForStateChange(StreamState inputState, StreamState *nextState, int64_t timeoutNanoseconds)=0 | oboe::AudioStream | pure virtual |
waitForStateTransition(StreamState startingState, StreamState endingState, int64_t timeoutNanoseconds) | oboe::AudioStream | protectedvirtual |
write(const void *buffer, int32_t numFrames, int64_t timeoutNanoseconds) | oboe::AudioStream | inlinevirtual |
~AudioStream()=default (defined in oboe::AudioStream) | oboe::AudioStream | virtual |
~AudioStreamBase()=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | virtual |
- Oboe
- 1.0
-
- Audio library for Android
- |
-
#include <AudioStream.h>
-Public Member Functions | |
- | AudioStream (const AudioStreamBuilder &builder) |
virtual Result | open () |
virtual Result | close ()=0 |
-virtual Result | start (int64_t timeoutNanoseconds=kDefaultTimeoutNanos) |
-virtual Result | pause (int64_t timeoutNanoseconds=kDefaultTimeoutNanos) |
-virtual Result | flush (int64_t timeoutNanoseconds=kDefaultTimeoutNanos) |
-virtual Result | stop (int64_t timeoutNanoseconds=kDefaultTimeoutNanos) |
-virtual Result | requestStart ()=0 |
-virtual Result | requestPause ()=0 |
-virtual Result | requestFlush ()=0 |
-virtual Result | requestStop ()=0 |
virtual StreamState | getState ()=0 |
virtual Result | waitForStateChange (StreamState inputState, StreamState *nextState, int64_t timeoutNanoseconds)=0 |
virtual ResultWithValue< int32_t > | setBufferSizeInFrames (int32_t requestedFrames) |
virtual ResultWithValue< int32_t > | getXRunCount () const |
virtual bool | isXRunCountSupported () const =0 |
virtual int32_t | getFramesPerBurst ()=0 |
-bool | isPlaying () |
-int32_t | getBytesPerFrame () const |
-int32_t | getBytesPerSample () const |
virtual int64_t | getFramesWritten () |
-virtual int64_t | getFramesRead () |
virtual ResultWithValue< double > | calculateLatencyMillis () |
-virtual Result | getTimestamp (clockid_t clockId, int64_t *framePosition, int64_t *timeNanoseconds) |
virtual ResultWithValue< int32_t > | write (const void *buffer, int32_t numFrames, int64_t timeoutNanoseconds) |
-virtual ResultWithValue< int32_t > | read (void *buffer, int32_t numFrames, int64_t timeoutNanoseconds) |
virtual AudioApi | getAudioApi () const =0 |
bool | usesAAudio () const |
virtual void * | getUnderlyingStream () const |
![]() | |
- | AudioStreamBase (const AudioStreamBase &)=default |
-AudioStreamBase & | operator= (const AudioStreamBase &)=default |
int | getChannelCount () const |
Direction | getDirection () const |
int32_t | getSampleRate () const |
int | getFramesPerCallback () const |
AudioFormat | getFormat () const |
virtual int32_t | getBufferSizeInFrames () |
virtual int32_t | getBufferCapacityInFrames () const |
-SharingMode | getSharingMode () const |
-PerformanceMode | getPerformanceMode () const |
-int32_t | getDeviceId () const |
-AudioStreamCallback * | getCallback () const |
-Usage | getUsage () const |
-ContentType | getContentType () const |
-InputPreset | getInputPreset () const |
-SessionId | getSessionId () const |
-Protected Member Functions | |
-virtual int64_t | incrementFramesWritten (int32_t frames) |
-virtual int64_t | incrementFramesRead (int32_t frames) |
virtual Result | waitForStateTransition (StreamState startingState, StreamState endingState, int64_t timeoutNanoseconds) |
virtual DataCallbackResult | onDefaultCallback (void *audioData, int numFrames) |
-DataCallbackResult | fireCallback (void *audioData, int numFrames) |
-virtual void | setNativeFormat (AudioFormat format) |
-Protected Attributes | |
-AudioFormat | mNativeFormat = AudioFormat::Invalid |
-int64_t | mFramesWritten = 0 |
-int64_t | mFramesRead = 0 |
![]() | |
-AudioStreamCallback * | mStreamCallback = nullptr |
-int32_t | mFramesPerCallback = kUnspecified |
-int32_t | mChannelCount = kUnspecified |
-int32_t | mSampleRate = kUnspecified |
-int32_t | mDeviceId = kUnspecified |
-int32_t | mBufferCapacityInFrames = kUnspecified |
-int32_t | mBufferSizeInFrames = kUnspecified |
-int32_t | mFramesPerBurst = kUnspecified |
-SharingMode | mSharingMode = SharingMode::Shared |
-AudioFormat | mFormat = AudioFormat::Unspecified |
-Direction | mDirection = Direction::Output |
-PerformanceMode | mPerformanceMode = PerformanceMode::None |
-Usage | mUsage = Usage::Media |
-ContentType | mContentType = ContentType::Music |
-InputPreset | mInputPreset = InputPreset::VoiceRecognition |
-SessionId | mSessionId = SessionId::None |
Base class for Oboe C++ audio stream.
-
-
|
- -inlinevirtual | -
Calculate the latency of a stream based on getTimestamp().
-Output latency is the time it takes for a given frame to travel from the app to some type of digital-to-analog converter. If the DAC is external, for example in a USB interface or a TV connected by HDMI, then there may be additional latency that the Android device is unaware of.
-Input latency is the time it takes to a given frame to travel from an analog-to-digital converter (ADC) to the app.
-Note that the latency of an OUTPUT stream will increase abruptly when you write data to it and then decrease slowly over time as the data is consumed.
-The latency of an INPUT stream will decrease abruptly when you read data from it and then increase slowly over time as more data arrives.
-The latency of an OUTPUT stream is generally higher than the INPUT latency because an app generally tries to keep the OUTPUT buffer full and the INPUT buffer empty.
-
-
|
- -pure virtual | -
Close the stream and deallocate any resources from the open() call.
- -
-
|
- -pure virtual | -
-
|
- -pure virtual | -
Query the number of frames that are read or written by the endpoint at one time.
-
-
|
- -inlinevirtual | -
This monotonic counter will never get reset.
-
|
- -pure virtual | -
Query the current state, eg. StreamState::Pausing
-
-
|
- -inlinevirtual | -
Do not use this for production. This is only for debugging. If you need to call this method then something is wrong. If you think you need it for production then please let us know so we can modify Oboe so that you don't need this.
-
-
|
- -inlinevirtual | -
An XRun is an Underrun or an Overrun. During playing, an underrun will occur if the stream is not written in time and the system runs out of valid data. During recording, an overrun will occur if the stream is not read in time and there is no place to put the incoming data so it is discarded.
-An underrun or overrun can cause an audible "pop" or "glitch".
-
-
|
- -pure virtual | -
-
|
- -inlineprotectedvirtual | -
Override this to provide a default for when the application did not specify a callback.
-audioData | |
numFrames |
-
|
- -virtual | -
Open a stream based on the current settings.
-Note that we do not recommend re-opening a stream that has been closed. TODO Should we prevent re-opening?
-
-
|
- -inlinevirtual | -
This can be used to adjust the latency of the buffer by changing the threshold where blocking will occur. By combining this with getXRunCount(), the latency can be tuned at run-time for each device.
-This cannot be set higher than getBufferCapacity().
-requestedFrames | requested number of frames that can be filled without blocking |
-
|
- -inline | -
-
|
- -pure virtual | -
Wait until the stream's current state no longer matches the input state. The input state is passed to avoid race conditions caused by the state changing between calls.
-Note that generally applications do not need to call this. It is considered an advanced technique.
-
-int64_t timeoutNanos = 500 * kNanosPerMillisecond; // arbitrary 1/2 second
-StreamState currentState = stream->getState();
-StreamState nextState = StreamState::Unknown;
-while (result == Result::OK && currentState != StreamState::Paused) {
- result = stream->waitForStateChange(
- currentState, &nextState, timeoutNanos);
- currentState = nextState;
-}
-
inputState | The state we want to avoid. |
nextState | Pointer to a variable that will be set to the new state. |
timeoutNanoseconds | The maximum time to wait in nanoseconds. |
-
|
- -protectedvirtual | -
Wait for a transition from one state to another.
-
|
- -inlinevirtual | -
A high level write that will wait until the write is complete or it runs out of time. If timeoutNanoseconds is zero then this call will not wait.
-stream | A stream created using OboeStream_Open(). |
buffer | The address of the first sample. |
numFrames | Number of frames to write. Only complete frames will be written. |
timeoutNanoseconds | Maximum number of nanoseconds to wait for completion. |
- Oboe
- 1.0
-
- Audio library for Android
- |
-
This is the complete list of members for oboe::AudioStreamBase, including all inherited members.
-AudioStreamBase() (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
AudioStreamBase(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
getBufferCapacityInFrames() const | oboe::AudioStreamBase | inlinevirtual |
getBufferSizeInFrames() | oboe::AudioStreamBase | inlinevirtual |
getCallback() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getChannelCount() const | oboe::AudioStreamBase | inline |
getContentType() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDeviceId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDirection() const | oboe::AudioStreamBase | inline |
getFormat() const | oboe::AudioStreamBase | inline |
getFramesPerCallback() const | oboe::AudioStreamBase | inline |
getInputPreset() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getPerformanceMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSampleRate() const | oboe::AudioStreamBase | inline |
getSessionId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSharingMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getUsage() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
mBufferCapacityInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferSizeInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mChannelCount (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mContentType (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDeviceId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDirection (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFormat (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerBurst (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mInputPreset (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mPerformanceMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSampleRate (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSessionId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSharingMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mStreamCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mUsage (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
operator=(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
~AudioStreamBase()=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | virtual |
- Oboe
- 1.0
-
- Audio library for Android
- |
-
#include <AudioStreamBase.h>
-Public Member Functions | |
- | AudioStreamBase (const AudioStreamBase &)=default |
-AudioStreamBase & | operator= (const AudioStreamBase &)=default |
int | getChannelCount () const |
Direction | getDirection () const |
int32_t | getSampleRate () const |
int | getFramesPerCallback () const |
AudioFormat | getFormat () const |
virtual int32_t | getBufferSizeInFrames () |
virtual int32_t | getBufferCapacityInFrames () const |
-SharingMode | getSharingMode () const |
-PerformanceMode | getPerformanceMode () const |
-int32_t | getDeviceId () const |
-AudioStreamCallback * | getCallback () const |
-Usage | getUsage () const |
-ContentType | getContentType () const |
-InputPreset | getInputPreset () const |
-SessionId | getSessionId () const |
-Protected Attributes | |
-AudioStreamCallback * | mStreamCallback = nullptr |
-int32_t | mFramesPerCallback = kUnspecified |
-int32_t | mChannelCount = kUnspecified |
-int32_t | mSampleRate = kUnspecified |
-int32_t | mDeviceId = kUnspecified |
-int32_t | mBufferCapacityInFrames = kUnspecified |
-int32_t | mBufferSizeInFrames = kUnspecified |
-int32_t | mFramesPerBurst = kUnspecified |
-SharingMode | mSharingMode = SharingMode::Shared |
-AudioFormat | mFormat = AudioFormat::Unspecified |
-Direction | mDirection = Direction::Output |
-PerformanceMode | mPerformanceMode = PerformanceMode::None |
-Usage | mUsage = Usage::Media |
-ContentType | mContentType = ContentType::Music |
-InputPreset | mInputPreset = InputPreset::VoiceRecognition |
-SessionId | mSessionId = SessionId::None |
Base class containing parameters for Oboe streams and builders.
-OboeStreamBuilder can return OBOE_UNSPECIFIED or the requested value.
-OboeStream will generally return the actual final value, but getFramesPerCallback() can be unspecified even for a stream.
-
-
|
- -inlinevirtual | -
-
|
- -inlinevirtual | -
Query the maximum number of frames that can be filled without blocking. If the stream has been closed the last known value will be returned.
-
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
-
|
- -inline | -
- Oboe
- 1.0
-
- Audio library for Android
- |
-
This is the complete list of members for oboe::AudioStreamBuilder, including all inherited members.
-AudioStreamBase() (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
AudioStreamBase(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
AudioStreamBuilder() (defined in oboe::AudioStreamBuilder) | oboe::AudioStreamBuilder | inline |
getAudioApi() const (defined in oboe::AudioStreamBuilder) | oboe::AudioStreamBuilder | inline |
getBufferCapacityInFrames() const | oboe::AudioStreamBase | inlinevirtual |
getBufferSizeInFrames() | oboe::AudioStreamBase | inlinevirtual |
getCallback() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getChannelCount() const | oboe::AudioStreamBase | inline |
getContentType() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDeviceId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getDirection() const | oboe::AudioStreamBase | inline |
getFormat() const | oboe::AudioStreamBase | inline |
getFramesPerCallback() const | oboe::AudioStreamBase | inline |
getInputPreset() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getPerformanceMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSampleRate() const | oboe::AudioStreamBase | inline |
getSessionId() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getSharingMode() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
getUsage() const (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | inline |
isAAudioRecommended() | oboe::AudioStreamBuilder | static |
isAAudioSupported() | oboe::AudioStreamBuilder | static |
mBufferCapacityInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mBufferSizeInFrames (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mChannelCount (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mContentType (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDeviceId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mDirection (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFormat (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerBurst (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mFramesPerCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mInputPreset (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mPerformanceMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSampleRate (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSessionId (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mSharingMode (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mStreamCallback (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
mUsage (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | protected |
openStream(AudioStream **stream) | oboe::AudioStreamBuilder | |
operator=(const AudioStreamBase &)=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | |
setAudioApi(AudioApi audioApi) | oboe::AudioStreamBuilder | inline |
setBufferCapacityInFrames(int32_t bufferCapacityInFrames) | oboe::AudioStreamBuilder | inline |
setCallback(AudioStreamCallback *streamCallback) | oboe::AudioStreamBuilder | inline |
setChannelCount(int channelCount) | oboe::AudioStreamBuilder | inline |
setContentType(ContentType contentType) | oboe::AudioStreamBuilder | inline |
setDeviceId(int32_t deviceId) | oboe::AudioStreamBuilder | inline |
setDirection(Direction direction) | oboe::AudioStreamBuilder | inline |
setFormat(AudioFormat format) | oboe::AudioStreamBuilder | inline |
setFramesPerCallback(int framesPerCallback) | oboe::AudioStreamBuilder | inline |
setInputPreset(InputPreset inputPreset) | oboe::AudioStreamBuilder | inline |
setPerformanceMode(PerformanceMode performanceMode) | oboe::AudioStreamBuilder | inline |
setSampleRate(int32_t sampleRate) | oboe::AudioStreamBuilder | inline |
setSessionId(SessionId sessionId) | oboe::AudioStreamBuilder | inline |
setSharingMode(SharingMode sharingMode) | oboe::AudioStreamBuilder | inline |
setUsage(Usage usage) | oboe::AudioStreamBuilder | inline |
~AudioStreamBase()=default (defined in oboe::AudioStreamBase) | oboe::AudioStreamBase | virtual |
- Oboe
- 1.0
-
- Audio library for Android
- |
-
#include <AudioStreamBuilder.h>
-Public Member Functions | |
AudioStreamBuilder * | setChannelCount (int channelCount) |
AudioStreamBuilder * | setDirection (Direction direction) |
AudioStreamBuilder * | setSampleRate (int32_t sampleRate) |
AudioStreamBuilder * | setFramesPerCallback (int framesPerCallback) |
AudioStreamBuilder * | setFormat (AudioFormat format) |
AudioStreamBuilder * | setBufferCapacityInFrames (int32_t bufferCapacityInFrames) |
-AudioApi | getAudioApi () const |
AudioStreamBuilder * | setAudioApi (AudioApi audioApi) |
AudioStreamBuilder * | setSharingMode (SharingMode sharingMode) |
AudioStreamBuilder * | setPerformanceMode (PerformanceMode performanceMode) |
AudioStreamBuilder * | setUsage (Usage usage) |
AudioStreamBuilder * | setContentType (ContentType contentType) |
AudioStreamBuilder * | setInputPreset (InputPreset inputPreset) |
AudioStreamBuilder * | setSessionId (SessionId sessionId) |
AudioStreamBuilder * | setDeviceId (int32_t deviceId) |
AudioStreamBuilder * | setCallback (AudioStreamCallback *streamCallback) |
Result | openStream (AudioStream **stream) |
![]() | |
- | AudioStreamBase (const AudioStreamBase &)=default |
-AudioStreamBase & | operator= (const AudioStreamBase &)=default |
int | getChannelCount () const |
Direction | getDirection () const |
int32_t | getSampleRate () const |
int | getFramesPerCallback () const |
AudioFormat | getFormat () const |
virtual int32_t | getBufferSizeInFrames () |
virtual int32_t | getBufferCapacityInFrames () const |
-SharingMode | getSharingMode () const |
-PerformanceMode | getPerformanceMode () const |
-int32_t | getDeviceId () const |
-AudioStreamCallback * | getCallback () const |
-Usage | getUsage () const |
-ContentType | getContentType () const |
-InputPreset | getInputPreset () const |
-SessionId | getSessionId () const |
-Static Public Member Functions | |
static bool | isAAudioSupported () |
static bool | isAAudioRecommended () |
-Additional Inherited Members | |
![]() | |
-AudioStreamCallback * | mStreamCallback = nullptr |
-int32_t | mFramesPerCallback = kUnspecified |
-int32_t | mChannelCount = kUnspecified |
-int32_t | mSampleRate = kUnspecified |
-int32_t | mDeviceId = kUnspecified |
-int32_t | mBufferCapacityInFrames = kUnspecified |
-int32_t | mBufferSizeInFrames = kUnspecified |
-int32_t | mFramesPerBurst = kUnspecified |
-SharingMode | mSharingMode = SharingMode::Shared |
-AudioFormat | mFormat = AudioFormat::Unspecified |
-Direction | mDirection = Direction::Output |
-PerformanceMode | mPerformanceMode = PerformanceMode::None |
-Usage | mUsage = Usage::Media |
-ContentType | mContentType = ContentType::Music |
-InputPreset | mInputPreset = InputPreset::VoiceRecognition |
-SessionId | mSessionId = SessionId::None |
Factory class for an audio Stream.
-
-
|
- -static | -
Is the AAudio API recommended this device?
-AAudio may be supported but not recommended because of version specific issues.
-
-
|
- -static | -
Is the AAudio API supported on this device?
-AAudio was introduced in the Oreo release.
-Result oboe::AudioStreamBuilder::openStream | -( | -AudioStream ** | -stream | ) | -- |
Create and open a stream object based on the current settings.
-stream | pointer to a variable to receive the stream address |
-
|
- -inline | -
If you leave this unspecified then Oboe will choose the best API for the device and SDK version at runtime.
-If the caller requests AAudio and it is supported then AAudio will be used.
-audioApi | Must be AudioApi::Unspecified, AudioApi::OpenSLES or AudioApi::AAudio. |
-
|
- -inline | -
Set the requested maximum buffer capacity in frames. The final stream capacity may differ, but will probably be at least this big.
-Default is kUnspecified.
-bufferCapacityInFrames | the desired buffer capacity in frames or kUnspecified |
-
|
- -inline | -
Specifies an object to handle data or error related callbacks from the underlying API.
-When an error callback occurs, the associated stream will be stopped and closed in a separate thread.
-A note on why the streamCallback parameter is a raw pointer rather than a smart pointer:
-The caller should retain ownership of the object streamCallback points to. At first glance weak_ptr may seem like a good candidate for streamCallback as this implies temporary ownership. However, a weak_ptr can only be created from a shared_ptr. A shared_ptr incurs some performance overhead. The callback object is likely to be accessed every few milliseconds when the stream requires new data so this overhead is something we want to avoid.
-This leaves a raw pointer as the logical type choice. The only caveat being that the caller must not destroy the callback before the stream has been closed.
-streamCallback |
-
|
- -inline | -
Request a specific number of channels.
-Default is kUnspecified. If the value is unspecified then the application should query for the actual value after the stream is opened.
- -
-
|
- -inline | -
Set the type of audio data that the stream will carry.
-The system will use this information to optimize the behavior of the stream. This could, for example, affect whether a stream is paused when a notification occurs.
-The default, if you do not call this function, is ContentType::Music.
-Added in API level 28.
-contentType | the type of audio data, eg. ContentType::Speech |
-
|
- -inline | -
Request an audio device identified device using an ID. On Android, for example, the ID could be obtained from the Java AudioManager.
-By default, the primary device will be used.
-Note that when using OpenSL ES, this will be ignored and the created stream will have deviceId kUnspecified.
-deviceId | device identifier or kUnspecified |
-
|
- -inline | -
Request the direction for a stream. The default is Direction::Output.
-direction | Direction::Output or Direction::Input |
-
|
- -inline | -
Request a sample data format, for example Format::Float.
-Default is Format::Unspecified. If the value is unspecified then the application should query for the actual value after the stream is opened.
- -
-
|
- -inline | -
Request a specific number of frames for the data callback.
-Default is kUnspecified. If the value is unspecified then the actual number may vary from callback to callback.
-If an application can handle a varying number of frames then we recommend leaving this unspecified. This allow the underlying API to optimize the callbacks. But if your application is, for example, doing FFTs or other block oriented operations, then call this function to get the sizes you need.
-framesPerCallback |
-
|
- -inline | -
Set the input (capture) preset for the stream.
-The system will use this information to optimize the behavior of the stream. This could, for example, affect which microphones are used and how the recorded data is processed.
-The default, if you do not call this function, is InputPreset::VoiceRecognition. That is because VoiceRecognition is the preset with the lowest latency on many platforms.
-Added in API level 28.
-inputPreset | the desired configuration for recording |
-
|
- -inline | -
Request a performance level for the stream. This will determine the latency, the power consumption, and the level of protection from glitches.
-performanceMode | for example, PerformanceMode::LowLatency |
-
|
- -inline | -
Request a specific sample rate in Hz.
-Default is kUnspecified. If the value is unspecified then the application should query for the actual value after the stream is opened.
-Technically, this should be called the "frame rate" or "frames per second", because it refers to the number of complete frames transferred per second. But it is traditionally called "sample rate". Se we use that term.
- -
-
|
- -inline | -
Set the requested session ID.
-The session ID can be used to associate a stream with effects processors. The effects are controlled using the Android AudioEffect Java API.
-The default, if you do not call this function, is SessionId::None.
-If set to SessionId::Allocate then a session ID will be allocated when the stream is opened.
-The allocated session ID can be obtained by calling AudioStream::getSessionId() and then used with this function when opening another stream. This allows effects to be shared between streams.
-Session IDs from Oboe can be used the Android Java APIs and vice versa. So a session ID from an Oboe stream can be passed to Java and effects applied using the Java AudioEffect API.
-Allocated session IDs will always be positive and nonzero.
-Added in API level 28.
-sessionId | an allocated sessionID or SessionId::Allocate |
-
|
- -inline | -
Request a mode for sharing the device. The requested sharing mode may not be available. So the application should query for the actual mode after the stream is opened.
-sharingMode | SharingMode::Shared or SharingMode::Exclusive |
-
|
- -inline | -
Set the intended use case for the stream.
-The system will use this information to optimize the behavior of the stream. This could, for example, affect how volume and focus is handled for the stream.
-The default, if you do not call this function, is Usage::Media.
-Added in API level 28.
-usage | the desired usage, eg. Usage::Game |
- Oboe
- 1.0
-
- Audio library for Android
- |
-
-Public Member Functions | |
virtual DataCallbackResult | onAudioReady (AudioStream *oboeStream, void *audioData, int32_t numFrames)=0 |
virtual void | onErrorBeforeClose (AudioStream *oboeStream, Result error) |
virtual void | onErrorAfterClose (AudioStream *oboeStream, Result error) |
-
|
- -pure virtual | -
A buffer is ready for processing.
-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 |
-
|
- -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.
-oboeStream | pointer to the associated stream |
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.
-oboeStream | pointer to the associated stream |
error |
- Oboe
- 1.0
-
- Audio library for Android
- |
-
-Static Public Attributes | |
static int32_t | SampleRate |
-static int32_t | FramesPerBurst |
-static int32_t | ChannelCount |
-
|
- -static | -
On API 16 to 25 OpenSL ES will be used. When using OpenSL ES the optimal values for sampleRate and framesPerBurst are not known by the native code. On API 17+ these values should be obtained from the AudioManager using this code:
-
-Note that this technique only works for built-in speakers and headphones.
- AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
- String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
- int defaultSampleRate = Integer.parseInt(sampleRateStr);
- String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
- int defaultFramesPerBurst = Integer.parseInt(framesPerBurstStr);
-
It can then be passed down to Oboe through JNI.
-AAudio will get the optimal framesPerBurst from the HAL and will ignore this value.
- -
- Oboe
- 1.0
-
- Audio library for Android
- |
-
#include <LatencyTuner.h>
-Public Member Functions | |
- | LatencyTuner (AudioStream &stream) |
Result | tune () |
void | requestReset () |
This can be used to dynamically tune the latency of an output stream. It adjusts the bufferSize based on the number of underruns. The bufferSize is the portion of the total bufferCapacity that is used to store data.
-This only affects the latency associated with the first level of buffering that is closest to the application. It does not affect low latency in the HAL, or touch latency in the UI.
-Call tune() right before returning from your data callback function if using callbacks. Call tune() right before calling write() if using blocking writes.
-If you want to see the ongoing results of this tuning process then call stream->getBufferSize() periodically.
-void oboe::LatencyTuner::requestReset | -( | -) | -- |
This may be called from another thread. Then tune() will call reset(), which will lower the latency to the minimum and then allow it to rise back up if there are glitches.
-This is typically called in response to a user decision to minimize latency. In other words, call this from a button handler.
- -Result oboe::LatencyTuner::tune | -( | -) | -- |
Adjust the bufferSizeInFrames to optimize latency. It will start with a low latency and then raise it if an underrun occurs.
-Latency tuning is only supported for AAudio.
-
- Oboe
- 1.0
-
- Audio library for Android
- |
-
-Public Member Functions | |
- | ResultWithValue (oboe::Result error) |
- | ResultWithValue (T value) |
-oboe::Result | error () const |
-T | value () const |
operator bool () const | |
bool | operator! () const |
operator Result () const | |
-Static Public Member Functions | |
static ResultWithValue< T > | createBasedOnSign (T numericResult) |
-
|
- -inlinestatic | -
Create a ResultWithValue from a number. If the number is positive the ResultWithValue will have a result of Result::OK and the value will contain the number. If the number is negative the result will be obtained from the negative number (numeric error codes can be found in AAudio.h) and the value will be null.
- -
-
|
- -inlineexplicit | -
-
|
- -inline | -
Implicitly convert to a Result. This enables easy comparison with Result values. Example:
- ResultWithValue result = openStream(); if (result == Result::ErrorNoMemory){ // tell user they're out of memory }
-
|
- -inline | -
Quick way to check for an error.
-The caller could write something like this: if (!result) { printf("Got error %s\n", convertToText(result.error())); }
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
- Oboe
- 1.0
-
- Audio library for Android
- |
-
-Classes | |
class | AudioStream |
class | AudioStreamBase |
class | AudioStreamBuilder |
class | AudioStreamCallback |
class | DefaultStreamValues |
class | LatencyTuner |
class | ResultWithValue |
struct | Version |
-Enumerations | |
enum | StreamState : aaudio_stream_state_t { - Uninitialized = AAUDIO_STREAM_STATE_UNINITIALIZED, -Unknown = AAUDIO_STREAM_STATE_UNKNOWN, -Open = AAUDIO_STREAM_STATE_OPEN, -Starting = AAUDIO_STREAM_STATE_STARTING, - - Started = AAUDIO_STREAM_STATE_STARTED, -Pausing = AAUDIO_STREAM_STATE_PAUSING, -Paused = AAUDIO_STREAM_STATE_PAUSED, -Flushing = AAUDIO_STREAM_STATE_FLUSHING, - - Flushed = AAUDIO_STREAM_STATE_FLUSHED, -Stopping = AAUDIO_STREAM_STATE_STOPPING, -Stopped = AAUDIO_STREAM_STATE_STOPPED, -Closing = AAUDIO_STREAM_STATE_CLOSING, - - Closed = AAUDIO_STREAM_STATE_CLOSED, -Disconnected = AAUDIO_STREAM_STATE_DISCONNECTED - - } |
enum | Direction : aaudio_direction_t { Output = AAUDIO_DIRECTION_OUTPUT, -Input = AAUDIO_DIRECTION_INPUT - } |
enum | AudioFormat : aaudio_format_t { Invalid = AAUDIO_FORMAT_INVALID, -Unspecified = AAUDIO_FORMAT_UNSPECIFIED, -I16 = AAUDIO_FORMAT_PCM_I16, -Float = AAUDIO_FORMAT_PCM_FLOAT - } |
enum | DataCallbackResult : aaudio_data_callback_result_t { Continue = AAUDIO_CALLBACK_RESULT_CONTINUE, -Stop = AAUDIO_CALLBACK_RESULT_STOP - } |
enum | Result : aaudio_result_t { - OK, -ErrorBase = AAUDIO_ERROR_BASE, -ErrorDisconnected = AAUDIO_ERROR_DISCONNECTED, -ErrorIllegalArgument = AAUDIO_ERROR_ILLEGAL_ARGUMENT, - - ErrorInternal = AAUDIO_ERROR_INTERNAL, -ErrorInvalidState = AAUDIO_ERROR_INVALID_STATE, -ErrorInvalidHandle = AAUDIO_ERROR_INVALID_HANDLE, -ErrorUnimplemented = AAUDIO_ERROR_UNIMPLEMENTED, - - ErrorUnavailable = AAUDIO_ERROR_UNAVAILABLE, -ErrorNoFreeHandles = AAUDIO_ERROR_NO_FREE_HANDLES, -ErrorNoMemory = AAUDIO_ERROR_NO_MEMORY, -ErrorNull = AAUDIO_ERROR_NULL, - - ErrorTimeout = AAUDIO_ERROR_TIMEOUT, -ErrorWouldBlock = AAUDIO_ERROR_WOULD_BLOCK, -ErrorInvalidFormat = AAUDIO_ERROR_INVALID_FORMAT, -ErrorOutOfRange = AAUDIO_ERROR_OUT_OF_RANGE, - - ErrorNoService = AAUDIO_ERROR_NO_SERVICE, -ErrorInvalidRate = AAUDIO_ERROR_INVALID_RATE, -Reserved1, -Reserved2, - - Reserved3, -Reserved4, -Reserved5, -Reserved6, - - Reserved7, -Reserved8, -Reserved9, -Reserved10, - - ErrorClosed - - } |
enum | SharingMode : aaudio_sharing_mode_t { SharingMode::Exclusive = AAUDIO_SHARING_MODE_EXCLUSIVE, -SharingMode::Shared = AAUDIO_SHARING_MODE_SHARED - } |
enum | PerformanceMode : aaudio_performance_mode_t { None = AAUDIO_PERFORMANCE_MODE_NONE, -PowerSaving = AAUDIO_PERFORMANCE_MODE_POWER_SAVING, -LowLatency = AAUDIO_PERFORMANCE_MODE_LOW_LATENCY - } |
enum | AudioApi : int32_t { Unspecified = kUnspecified, -AudioApi::OpenSLES, -AudioApi::AAudio - } |
enum | Usage : aaudio_usage_t { - Usage::Media = CONSTANT_API_P(1, AAUDIO_USAGE_MEDIA), -VoiceCommunication = CONSTANT_API_P(2, AAUDIO_USAGE_VOICE_COMMUNICATION), -Usage::VoiceCommunicationSignalling, -Usage::Alarm = CONSTANT_API_P(4, AAUDIO_USAGE_ALARM), - - Usage::Notification = CONSTANT_API_P(5, AAUDIO_USAGE_NOTIFICATION), -Usage::NotificationRingtone = CONSTANT_API_P(6, AAUDIO_USAGE_NOTIFICATION_RINGTONE), -Usage::NotificationEvent = CONSTANT_API_P(10, AAUDIO_USAGE_NOTIFICATION_EVENT), -Usage::AssistanceAccessibility = CONSTANT_API_P(11, AAUDIO_USAGE_ASSISTANCE_ACCESSIBILITY), - - Usage::AssistanceNavigationGuidance, -Usage::AssistanceSonification = CONSTANT_API_P(13, AAUDIO_USAGE_ASSISTANCE_SONIFICATION), -Usage::Game = CONSTANT_API_P(14, AAUDIO_USAGE_GAME), -Usage::Assistant = CONSTANT_API_P(16, AAUDIO_USAGE_ASSISTANT) - - } |
enum | ContentType : aaudio_content_type_t { Speech = CONSTANT_API_P(1, AAUDIO_CONTENT_TYPE_SPEECH), -Music = CONSTANT_API_P(2, AAUDIO_CONTENT_TYPE_MUSIC), -Movie = CONSTANT_API_P(3, AAUDIO_CONTENT_TYPE_MOVIE), -Sonification = CONSTANT_API_P(4, AAUDIO_CONTENT_TYPE_SONIFICATION) - } |
enum | InputPreset : aaudio_input_preset_t { - Generic = CONSTANT_API_P(1, AAUDIO_INPUT_PRESET_GENERIC), -Camcorder = CONSTANT_API_P(5, AAUDIO_INPUT_PRESET_CAMCORDER), -VoiceRecognition = CONSTANT_API_P(6, AAUDIO_INPUT_PRESET_VOICE_RECOGNITION), -VoiceCommunication = CONSTANT_API_P(7, AAUDIO_INPUT_PRESET_VOICE_COMMUNICATION), - - VoiceCommunication = CONSTANT_API_P(2, AAUDIO_USAGE_VOICE_COMMUNICATION), -Unprocessed = CONSTANT_API_P(9, AAUDIO_INPUT_PRESET_UNPROCESSED) - - } |
enum | SessionId { None = CONSTANT_API_P(-1, AAUDIO_SESSION_ID_NONE), -None = AAUDIO_PERFORMANCE_MODE_NONE, -Allocate = CONSTANT_API_P(0, AAUDIO_SESSION_ID_ALLOCATE) - } |
enum | ChannelCount : int32_t { - Unspecified = kUnspecified, -Unspecified = AAUDIO_FORMAT_UNSPECIFIED, -Unspecified = kUnspecified, -Mono = 1, - - Stereo = 2 - - } |
-Functions | |
-template<typename T > | |
std::ostream & | operator<< (std::ostream &strm, const ResultWithValue< T > &result) |
-void | convertFloatToPcm16 (const float *source, int16_t *destination, int32_t numSamples) |
-void | convertPcm16ToFloat (const int16_t *source, float *destination, int32_t numSamples) |
int32_t | convertFormatToSizeInBytes (AudioFormat format) |
template<typename FromType > | |
const char * | convertToText (FromType) |
int | getSdkVersion () |
-Variables | |
-constexpr int64_t | kDefaultTimeoutNanos = (2000 * kNanosPerMillisecond) |
-constexpr int32_t | kUnspecified = 0 |
-constexpr int64_t | kNanosPerMicrosecond = 1000 |
-constexpr int64_t | kNanosPerMillisecond = kNanosPerMicrosecond * 1000 |
-constexpr int64_t | kMillisPerSecond = 1000 |
-constexpr int64_t | kNanosPerSecond = kNanosPerMillisecond * kMillisPerSecond |
WARNING - UNDER CONSTRUCTION - THIS API WILL CHANGE.
-
-
|
- -strong | -
enum oboe::ChannelCount : int32_t | -
enum oboe::ContentType : aaudio_content_type_t | -
The CONTENT_TYPE attribute describes "what" you are playing. It expresses the general category of the content. This information is optional. But in case it is known (for instance AAUDIO_CONTENT_TYPE_MOVIE for a movie streaming service or AAUDIO_CONTENT_TYPE_SPEECH for an audio book application) this information might be used by the audio framework to enforce audio focus.
-Note that these match the equivalent values in AudioAttributes in the Android Java API.
-Added in API level 28.
-Enumerator | |
---|---|
Speech | Use this for spoken voice, audio books, etcetera. - |
Music | Use this for pre-recorded or live music. - |
Movie | Use this for a movie or video soundtrack. - |
Sonification | Use this for sound is designed to accompany a user action, such as a click or beep sound made when the user presses a button. - |
enum oboe::InputPreset : aaudio_input_preset_t | -
Defines the audio source. An audio source defines both a default physical source of audio signal, and a recording configuration.
-Note that these match the equivalent values in MediaRecorder.AudioSource in the Android Java API.
-Added in API level 28.
-Enumerator | |
---|---|
Generic | Use this preset when other presets do not apply. - |
Camcorder | Use this preset when recording video. - |
VoiceRecognition | Use this preset when doing speech recognition. - |
VoiceCommunication | Use this preset when doing telephony or voice messaging. - |
VoiceCommunication | Use this for voice over IP, telephony, etcetera. - |
Unprocessed | Use this preset to obtain an input with no effects. Note that this input will not have automatic gain control so the recorded volume may be very low. - |
enum oboe::SessionId | -
Enumerator | |
---|---|
None | Do not allocate a session ID. Effects cannot be used with this stream. Default. -Added in API level 28. - |
Allocate | Allocate a session ID that can be used to attach and control effects using the Java AudioEffects API. Note that the use of this flag may result in higher latency. -Note that this matches the value of AudioManager.AUDIO_SESSION_ID_GENERATE. -Added in API level 28. - |
-
|
- -strong | -
Enumerator | |
---|---|
Exclusive | This will be the only stream using a particular source or sink. This mode will provide the lowest possible latency. You should close EXCLUSIVE streams immediately when you are not using them. - |
Shared | Multiple applications will be mixed by the AAudio Server. This will have higher latency than the EXCLUSIVE mode. - |
-
|
- -strong | -
The Usage attribute expresses "why" you are playing a sound, what is this sound used for. This information is used by certain platforms or routing policies to make more refined volume or routing decisions.
-Note that these match the equivalent values in AudioAttributes in the Android Java API.
-Added in API level 28.
-Enumerator | |
---|---|
Media | Use this for streaming media, music performance, video, podcasts, etcetera. - |
VoiceCommunication | Use this for voice over IP, telephony, etcetera. - |
VoiceCommunicationSignalling | Use this for sounds associated with telephony such as busy tones, DTMF, etcetera. - |
Alarm | Use this to demand the users attention. - |
Notification | Use this for notifying the user when a message has arrived or some other background event has occured. - |
NotificationRingtone | Use this when the phone rings. - |
NotificationEvent | Use this to attract the users attention when, for example, the battery is low. - |
AssistanceAccessibility | Use this for screen readers, etcetera. - |
AssistanceNavigationGuidance | Use this for driving or navigation directions. - |
AssistanceSonification | Use this for user interface sounds, beeps, etcetera. - |
Game | Use this for game audio and sound effects. - |
Assistant | Use this for audio responses to user queries, audio instructions or help utterances. - |
int32_t oboe::convertFormatToSizeInBytes | -( | -AudioFormat | -format | ) | -- |
const char* oboe::convertToText | -( | -FromType | -) | -- |
The text is the ASCII symbol corresponding to the supplied Oboe enum value, or an English message saying the value is unrecognized. This is intended for developers to use when debugging. It is not for displaying to users.
-enum | value |
int oboe::getSdkVersion | -( | -) | -- |
Return the version of the SDK that is currently running.
-For example, on Android, this would return 27 for Oreo 8.1. If the version number cannot be determined then this will return -1.
-
+ Oboe
+ 1.0
+
+ Audio library for Android
+ |
+
Deprecated List |
+ // Note that this technique only works for built-in speakers and headphones.
+ AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+ String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
+ int defaultSampleRate = Integer.parseInt(sampleRateStr);
+ String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
+ int defaultFramesPerBurst = Integer.parseInt(framesPerBurstStr);
+
+ *
+ * It can then be passed down to Oboe through JNI.
+ *
+ * AAudio will get the optimal framesPerBurst from the HAL and will ignore this value.
+ */
class DefaultStreamValues {
public:
- /**
- * On API 16 to 25 OpenSL ES will be used. When using OpenSL ES the optimal values for sampleRate and
- * framesPerBurst are not known by the native code.
- * On API 17+ these values should be obtained from the AudioManager using this code:
- *
- *
- // Note that this technique only works for built-in speakers and headphones.
- AudioManager myAudioMgr = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
- String sampleRateStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
- int defaultSampleRate = Integer.parseInt(sampleRateStr);
- String framesPerBurstStr = myAudioMgr.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
- int defaultFramesPerBurst = Integer.parseInt(framesPerBurstStr);
-
- *
- * It can then be passed down to Oboe through JNI.
- *
- * AAudio will get the optimal framesPerBurst from the HAL and will ignore this value.
- */
+ /** The default sample rate to use when opening new audio streams */
static int32_t SampleRate;
+ /** The default frames per burst to use when opening new audio streams */
static int32_t FramesPerBurst;
+ /** The default channel count to use when opening new audio streams */
static int32_t ChannelCount;
+
};
diff --git a/include/oboe/LatencyTuner.h b/include/oboe/LatencyTuner.h
index 7b879ba57..84889b1e4 100644
--- a/include/oboe/LatencyTuner.h
+++ b/include/oboe/LatencyTuner.h
@@ -25,9 +25,8 @@
namespace oboe {
/**
- * This can be used to dynamically tune the latency of an output stream.
- * It adjusts the bufferSize based on the number of underruns.
- * The bufferSize is the portion of the total bufferCapacity that is used to store data.
+ * LatencyTuner can be used to dynamically tune the latency of an output stream.
+ * It adjusts the stream's bufferSize by monitoring the number of underruns.
*
* This only affects the latency associated with the first level of buffering that is closest
* to the application. It does not affect low latency in the HAL, or touch latency in the UI.
@@ -41,6 +40,12 @@ namespace oboe {
*/
class LatencyTuner {
public:
+
+ /**
+ * Construct a new LatencyTuner object which will act on the given audio stream
+ *
+ * @param stream the stream who's latency will be tuned
+ */
explicit LatencyTuner(AudioStream &stream);
/**
diff --git a/include/oboe/ResultWithValue.h b/include/oboe/ResultWithValue.h
index a198803dd..edc125e43 100644
--- a/include/oboe/ResultWithValue.h
+++ b/include/oboe/ResultWithValue.h
@@ -23,21 +23,61 @@
namespace oboe {
+/**
+ * A ResultWithValue can store both the result of an operation (either OK or an error) and a value.
+ *
+ * It has been designed for cases where the caller needs to know whether an operation succeeded and,
+ * if it did, a value which was obtained during the operation.
+ *
+ * For example, when reading from a stream the caller needs to know the result of the read operation
+ * and, if it was successful, how many frames were read. Note that ResultWithValue can be evaluated
+ * as a boolean so it's simple to check whether the result is OK.
+ *
+ *
+ * ResultWithValue resultOfRead = myStream.read(&buffer, numFrames, timeoutNanoseconds);
+ *
+ * if (resultOfRead){
+ * LOGD("Frames read: %d", resultOfRead.value());
+ * } else {
+ * LOGD("Error reading from stream: %s", resultOfRead.error());
+ * }
+ *
+ */
template