17 #ifndef OBOE_STREAM_BUILDER_H_ 18 #define OBOE_STREAM_BUILDER_H_ 20 #include "oboe/Definitions.h" 21 #include "oboe/AudioStreamBase.h" 22 #include "ResultWithValue.h" 27 struct StreamDeleterFunctor;
28 using ManagedStream = std::unique_ptr<AudioStream, StreamDeleterFunctor>;
157 mAudioApi = audioApi;
389 mChannelConversionAllowed = allowed;
401 mFormatConversionAllowed = allowed;
417 mSampleRateConversionQuality = quality;
480 AudioApi mAudioApi = AudioApi::Unspecified;
AudioStreamBuilder * setDeviceId(int32_t deviceId)
Definition: AudioStreamBuilder.h:310
Definition: AudioStreamBuilder.h:33
SessionId mSessionId
Definition: AudioStreamBase.h:223
AudioStreamBuilder * setPerformanceMode(PerformanceMode performanceMode)
Definition: AudioStreamBuilder.h:201
Direction mDirection
Definition: AudioStreamBase.h:210
AudioStreamDataCallback * mDataCallback
Definition: AudioStreamBase.h:182
AudioFormat mFormat
Definition: AudioStreamBase.h:208
ContentType mContentType
Definition: AudioStreamBase.h:217
static bool isAAudioRecommended()
AudioStreamBuilder * setSampleRateConversionQuality(SampleRateConversionQuality quality)
Definition: AudioStreamBuilder.h:416
PerformanceMode
Definition: Definitions.h:192
SessionId
Definition: Definitions.h:414
AudioStreamBuilder * setSessionId(SessionId sessionId)
Definition: AudioStreamBuilder.h:287
PerformanceMode mPerformanceMode
Definition: AudioStreamBase.h:212
Definition: AudioStreamCallback.h:34
Definition: AudioStreamCallback.h:181
SharingMode mSharingMode
Definition: AudioStreamBase.h:206
AudioStreamBuilder * setContentType(ContentType contentType)
Definition: AudioStreamBuilder.h:238
int32_t mChannelCount
Definition: AudioStreamBase.h:190
AudioApi
Definition: Definitions.h:213
ContentType
Definition: Definitions.h:339
AudioStreamBuilder * setUsage(Usage usage)
Definition: AudioStreamBuilder.h:220
int32_t mDeviceId
Definition: AudioStreamBase.h:194
static bool isAAudioSupported()
AudioStreamBuilder * setChannelConversionAllowed(bool allowed)
Definition: AudioStreamBuilder.h:388
AudioStreamBuilder * setFramesPerCallback(int framesPerCallback)
Definition: AudioStreamBuilder.h:80
AudioStreamBuilder * setDirection(Direction direction)
Definition: AudioStreamBuilder.h:56
AudioStreamBuilder * setFormat(AudioFormat format)
Definition: AudioStreamBuilder.h:109
Usage mUsage
Definition: AudioStreamBase.h:215
Definition: AudioStream.h:44
Usage
Definition: Definitions.h:263
Definition: AudioStreamCallback.h:97
AudioStreamBuilder * setAudioApi(AudioApi audioApi)
Definition: AudioStreamBuilder.h:156
AudioStreamBuilder * setInputPreset(InputPreset inputPreset)
Definition: AudioStreamBuilder.h:258
Result openManagedStream(ManagedStream &stream)
AudioStreamBuilder * setSampleRate(int32_t sampleRate)
Definition: AudioStreamBuilder.h:72
int32_t mSampleRate
Definition: AudioStreamBase.h:192
Definition: AudioStreamBase.h:29
int32_t mBufferCapacityInFrames
Definition: AudioStreamBase.h:196
AudioStreamBuilder * setBufferCapacityInFrames(int32_t bufferCapacityInFrames)
Definition: AudioStreamBuilder.h:126
AudioStreamBuilder * setFramesPerDataCallback(int framesPerCallback)
Definition: AudioStreamBuilder.h:98
Result openStream(AudioStream **stream)
AudioFormat
Definition: Definitions.h:94
AudioStreamBuilder * setErrorCallback(oboe::AudioStreamErrorCallback *errorCallback)
Definition: AudioStreamBuilder.h:344
Result
Definition: Definitions.h:131
AudioStreamBuilder * setSharingMode(SharingMode sharingMode)
Definition: AudioStreamBuilder.h:188
Definition: AudioStream.h:31
bool willUseAAudio() const
Definition: AudioStreamBuilder.h:424
SampleRateConversionQuality
Definition: Definitions.h:235
InputPreset mInputPreset
Definition: AudioStreamBase.h:221
Direction
Definition: Definitions.h:78
SharingMode
Definition: Definitions.h:167
InputPreset
Definition: Definitions.h:372
AudioStreamBuilder * setChannelCount(int channelCount)
Definition: AudioStreamBuilder.h:46
AudioStreamBuilder * setCallback(AudioStreamCallback *streamCallback)
Definition: AudioStreamBuilder.h:372
AudioStreamBuilder * setDataCallback(oboe::AudioStreamDataCallback *dataCallback)
Definition: AudioStreamBuilder.h:324
int32_t mFramesPerCallback
Definition: AudioStreamBase.h:188
AudioStreamBuilder * setFormatConversionAllowed(bool allowed)
Definition: AudioStreamBuilder.h:400
AudioApi getAudioApi() const
Definition: AudioStreamBuilder.h:141
AudioStreamErrorCallback * mErrorCallback
Definition: AudioStreamBase.h:185