Oboe
A library for creating real-time audio apps on Android
|
#include <AudioStreamBase.h>
Public Member Functions | |
AudioStreamBase (const AudioStreamBase &)=default | |
AudioStreamBase & | operator= (const AudioStreamBase &)=default |
int32_t | getChannelCount () const |
Direction | getDirection () const |
int32_t | getSampleRate () const |
int32_t | getFramesPerCallback () const |
int32_t | getFramesPerDataCallback () const |
AudioFormat | getFormat () const |
virtual int32_t | getBufferSizeInFrames () |
virtual int32_t | getBufferCapacityInFrames () const |
SharingMode | getSharingMode () const |
PerformanceMode | getPerformanceMode () const |
int32_t | getDeviceId () const |
std::vector< int32_t > | getDeviceIds () const |
AudioStreamDataCallback * | getDataCallback () const |
AudioStreamErrorCallback * | getErrorCallback () const |
std::shared_ptr< AudioStreamPresentationCallback > | getPresentationCallback () const |
bool | isDataCallbackSpecified () const |
bool | isErrorCallbackSpecified () const |
bool | isPresentationCallbackSpecified () const |
Usage | getUsage () const |
ContentType | getContentType () const |
InputPreset | getInputPreset () const |
SessionId | getSessionId () const |
bool | isContentSpatialized () const |
SpatializationBehavior | getSpatializationBehavior () const |
AllowedCapturePolicy | getAllowedCapturePolicy () const |
PrivacySensitiveMode | getPrivacySensitiveMode () const |
std::string | getPackageName () const |
std::string | getAttributionTag () const |
bool | isChannelConversionAllowed () const |
bool | isFormatConversionAllowed () const |
SampleRateConversionQuality | getSampleRateConversionQuality () const |
ChannelMask | getChannelMask () const |
int32_t | getHardwareChannelCount () const |
int32_t | getHardwareSampleRate () const |
AudioFormat | getHardwareFormat () const |
Protected Member Functions | |
virtual Result | isValidConfig () |
Protected Attributes | |
AudioStreamDataCallback * | mDataCallback = nullptr |
std::shared_ptr< AudioStreamDataCallback > | mSharedDataCallback |
AudioStreamErrorCallback * | mErrorCallback = nullptr |
std::shared_ptr< AudioStreamErrorCallback > | mSharedErrorCallback |
std::shared_ptr< AudioStreamPresentationCallback > | mSharedPresentationCallback |
int32_t | mFramesPerCallback = kUnspecified |
int32_t | mChannelCount = kUnspecified |
int32_t | mSampleRate = kUnspecified |
int32_t | mBufferCapacityInFrames = kUnspecified |
int32_t | mBufferSizeInFrames = kUnspecified |
ChannelMask | mChannelMask = ChannelMask::Unspecified |
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 |
AllowedCapturePolicy | mAllowedCapturePolicy = AllowedCapturePolicy::Unspecified |
PrivacySensitiveMode | mPrivacySensitiveMode = PrivacySensitiveMode::Unspecified |
std::string | mPackageName |
std::string | mAttributionTag |
bool | mIsContentSpatialized = false |
SpatializationBehavior | mSpatializationBehavior = SpatializationBehavior::Unspecified |
int32_t | mHardwareChannelCount = kUnspecified |
int32_t | mHardwareSampleRate = kUnspecified |
AudioFormat | mHardwareFormat = AudioFormat::Unspecified |
bool | mChannelConversionAllowed = false |
bool | mFormatConversionAllowed = false |
SampleRateConversionQuality | mSampleRateConversionQuality = SampleRateConversionQuality::Medium |
std::vector< int32_t > | mDeviceIds |
Base class containing parameters for audio streams and builders.
|
default |
Default copy constructor
|
inline |
Return the policy that determines whether the audio may or may not be captured by other apps or the system.
See AudioStreamBuilder_setAllowedCapturePolicy().
Added in API level 29 to AAudio.
|
inline |
Return the stream's attribution tag
See AudioStreamBuilder_setAttributionTag().
Added in API level 31 to AAudio.
|
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 |
For internal use only.
|
inline |
|
inline |
|
inline |
For internal use only.
|
inline |
|
inline |
getFramesPerDataCallback
instead.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the stream's package name
See AudioStreamBuilder_setPackageName().
Added in API level 31 to AAudio.
|
inline |
|
inline |
For internal use only.
|
inline |
Return whether this input stream is marked as privacy sensitive.
See AudioStreamBuilder_setPrivacySensitiveMode().
Added in API level 30 to AAudio.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Note that if the app does not set an error callback then a default one may be provided.
|
inline |
|
inline |
|
inlineprotectedvirtual |
Validate stream parameters that might not be checked in lower layers
|
default |
Default assignment operator
|
protected |
Allowed Capture Policy. Only active on Android 29+
|
protected |
Control the attribution tag of the context creating the stream. Only active on Android 31+
|
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 channel mask. Only active on Android 32+
|
protected |
Stream content type. Only active on Android 28+
|
protected |
The callback which will be fired when new data is ready to be read/written.
|
protected |
Stream direction
|
protected |
The callback which will be fired when an error or a disconnect occurs.
|
protected |
Format of audio frames
|
protected |
Number of audio frames which will be requested in each callback
|
protected |
Hardware channel count. Only specified on Android 34+ AAudio streams
|
protected |
Hardware format. Only specified on Android 34+ AAudio streams
|
protected |
Hardware sample rate. Only specified on Android 34+ AAudio streams
|
protected |
Stream input preset. Only active on Android 28+ TODO InputPreset::Unspecified should be considered as a possible default alternative.
|
protected |
Whether the content is already spatialized. Only used on Android 32+
|
protected |
Control the name of the package creating the stream. Only active on Android 31+
|
protected |
Stream performance mode
|
protected |
Privacy Sensitive Mode. Only active on Android 30+
|
protected |
Stream sample rate
|
protected |
Stream session ID allocation strategy. Only active on Android 28+
|
protected |
Stream sharing mode
|
protected |
Spatialization Behavior. Only active on Android 32+
|
protected |
Stream usage. Only active on Android 28+