17 #ifndef OBOE_STREAM_BASE_H_ 18 #define OBOE_STREAM_BASE_H_ 21 #include "oboe/AudioStreamCallback.h" 22 #include "oboe/Definitions.h" 163 return mChannelConversionAllowed;
170 return mFormatConversionAllowed;
177 return mSampleRateConversionQuality;
226 bool mChannelConversionAllowed =
false;
228 bool mFormatConversionAllowed =
false;
235 case AudioFormat::Unspecified:
241 return Result::ErrorInvalidFormat;
244 switch (mSampleRateConversionQuality) {
245 case SampleRateConversionQuality::None:
247 case SampleRateConversionQuality::Low:
248 case SampleRateConversionQuality::Medium:
249 case SampleRateConversionQuality::High:
253 return Result::ErrorIllegalArgument;
AudioStreamDataCallback * getDataCallback() const
Definition: AudioStreamBase.h:111
bool isChannelConversionAllowed() const
Definition: AudioStreamBase.h:162
int32_t mBufferSizeInFrames
Definition: AudioStreamBase.h:198
SessionId mSessionId
Definition: AudioStreamBase.h:223
Direction mDirection
Definition: AudioStreamBase.h:210
int32_t getDeviceId() const
Definition: AudioStreamBase.h:105
AudioStreamDataCallback * mDataCallback
Definition: AudioStreamBase.h:182
AudioFormat mFormat
Definition: AudioStreamBase.h:208
bool isErrorCallbackSpecified() const
Definition: AudioStreamBase.h:135
int32_t getFramesPerCallback() const
Definition: AudioStreamBase.h:67
ContentType mContentType
Definition: AudioStreamBase.h:217
PerformanceMode
Definition: Definitions.h:192
SessionId
Definition: Definitions.h:414
PerformanceMode mPerformanceMode
Definition: AudioStreamBase.h:212
PerformanceMode getPerformanceMode() const
Definition: AudioStreamBase.h:100
int32_t getChannelCount() const
Definition: AudioStreamBase.h:52
SessionId getSessionId() const
Definition: AudioStreamBase.h:157
Definition: AudioStreamCallback.h:34
SharingMode mSharingMode
Definition: AudioStreamBase.h:206
int32_t mChannelCount
Definition: AudioStreamBase.h:190
bool isFormatConversionAllowed() const
Definition: AudioStreamBase.h:169
AudioFormat getFormat() const
Definition: AudioStreamBase.h:77
ContentType
Definition: Definitions.h:339
int32_t getFramesPerDataCallback() const
Definition: AudioStreamBase.h:72
int32_t mDeviceId
Definition: AudioStreamBase.h:194
virtual Result isValidConfig()
Definition: AudioStreamBase.h:233
ContentType getContentType() const
Definition: AudioStreamBase.h:147
Usage mUsage
Definition: AudioStreamBase.h:215
Usage
Definition: Definitions.h:263
Definition: AudioStreamCallback.h:97
int32_t getSampleRate() const
Definition: AudioStreamBase.h:62
int32_t mSampleRate
Definition: AudioStreamBase.h:192
int32_t mFramesPerBurst
Definition: AudioStreamBase.h:203
SharingMode getSharingMode() const
Definition: AudioStreamBase.h:95
Definition: AudioStreamBase.h:29
int32_t mBufferCapacityInFrames
Definition: AudioStreamBase.h:196
SampleRateConversionQuality getSampleRateConversionQuality() const
Definition: AudioStreamBase.h:176
AudioStreamBase & operator=(const AudioStreamBase &)=default
virtual int32_t getBufferSizeInFrames()
Definition: AudioStreamBase.h:85
AudioFormat
Definition: Definitions.h:94
Result
Definition: Definitions.h:131
constexpr int32_t kUnspecified
Definition: Definitions.h:32
virtual int32_t getBufferCapacityInFrames() const
Definition: AudioStreamBase.h:90
Definition: AudioStream.h:31
SampleRateConversionQuality
Definition: Definitions.h:235
InputPreset mInputPreset
Definition: AudioStreamBase.h:221
Direction
Definition: Definitions.h:78
Direction getDirection() const
Definition: AudioStreamBase.h:57
SharingMode
Definition: Definitions.h:167
InputPreset
Definition: Definitions.h:372
int32_t mFramesPerCallback
Definition: AudioStreamBase.h:188
bool isDataCallbackSpecified() const
Definition: AudioStreamBase.h:126
Usage getUsage() const
Definition: AudioStreamBase.h:142
AudioStreamErrorCallback * mErrorCallback
Definition: AudioStreamBase.h:185
InputPreset getInputPreset() const
Definition: AudioStreamBase.h:152
AudioStreamErrorCallback * getErrorCallback() const
Definition: AudioStreamBase.h:119