[][src]Crate oboe_sys

Structs

oboe_AudioStream

Base class for Oboe C++ audio stream.

oboe_AudioStreamBase

Base class containing parameters for audio streams and builders.

oboe_AudioStreamBase__bindgen_vtable
oboe_AudioStreamBuilder

Factory class for an audio Stream.

oboe_AudioStreamCallback

AudioStreamCallback defines a callback interface for:

oboe_AudioStreamCallbackWrapper
oboe_AudioStreamDataCallback

AudioStreamDataCallback defines a callback interface for moving data to/from an audio stream using onAudioReady 2) being alerted when a stream has an error using onError* methods

oboe_AudioStreamDataCallback__bindgen_vtable
oboe_AudioStreamErrorCallback

AudioStreamErrorCallback defines a callback interface for being alerted when a stream has an error or is disconnected using onError* methods.

oboe_AudioStreamErrorCallback__bindgen_vtable
oboe_DefaultStreamValues

On API 16 to 26 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:

oboe_FrameTimestamp

The time at which the frame at position was presented

oboe_LatencyTuner

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.

oboe_ResultWithValue

A ResultWithValue can store both the result of an operation (either OK or an error) and a value.

oboe_StabilizedCallback
oboe_StreamDeleterFunctor

This struct is a stateless functor which closes an AudioStream prior to its deletion. This means it can be used to safely delete a smart pointer referring to an open stream.

oboe_Version

Oboe versioning object

Constants

oboe_AudioApi_AAudio

Try to use AAudio. Fail if unavailable.

oboe_AudioApi_OpenSLES

Use OpenSL ES.

oboe_AudioApi_Unspecified

Try to use AAudio. If not available then use OpenSL ES.

oboe_AudioFormat_Float

Single precision floating points.

oboe_AudioFormat_I16

Signed 16-bit integers.

oboe_AudioFormat_Invalid

Invalid format.

oboe_AudioFormat_Unspecified

Unspecified format. Format will be decided by Oboe.

oboe_ChannelCount_Mono

Use this for mono audio

oboe_ChannelCount_Stereo

Use this for stereo audio.

oboe_ChannelCount_Unspecified

Audio channel count definition, use Mono or Stereo

oboe_ContentType_Movie

Use this for a movie or video soundtrack.

oboe_ContentType_Music

Use this for pre-recorded or live music.

oboe_ContentType_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.

oboe_ContentType_Speech

Use this for spoken voice, audio books, etcetera.

oboe_DataCallbackResult_Continue
oboe_DataCallbackResult_Stop
oboe_Direction_Input

Used for recording.

oboe_Direction_Output

Used for playback.

oboe_InputPreset_Camcorder

Use this preset when recording video.

oboe_InputPreset_Generic

Use this preset when other presets do not apply.

oboe_InputPreset_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.

oboe_InputPreset_VoiceCommunication

Use this preset when doing telephony or voice messaging.

oboe_InputPreset_VoicePerformance

Use this preset for capturing audio meant to be processed in real time and played back for live performance (e.g karaoke). The capture path will minimize latency and coupling with playback path.

oboe_InputPreset_VoiceRecognition

Use this preset when doing speech recognition.

oboe_LatencyTuner_State_Active
oboe_LatencyTuner_State_AtMax
oboe_LatencyTuner_State_Idle
oboe_LatencyTuner_State_Unsupported
oboe_LatencyTuner_kDefaultNumBursts
oboe_LatencyTuner_kIdleCount
oboe_PerformanceMode_LowLatency

Reducing latency is most important.

oboe_PerformanceMode_None

No particular performance needs. Default.

oboe_PerformanceMode_PowerSaving

Extending battery life is most important.

oboe_Result_ErrorBase
oboe_Result_ErrorClosed
oboe_Result_ErrorDisconnected
oboe_Result_ErrorIllegalArgument
oboe_Result_ErrorInternal
oboe_Result_ErrorInvalidFormat
oboe_Result_ErrorInvalidHandle
oboe_Result_ErrorInvalidRate
oboe_Result_ErrorInvalidState
oboe_Result_ErrorNoFreeHandles
oboe_Result_ErrorNoMemory
oboe_Result_ErrorNoService
oboe_Result_ErrorNull
oboe_Result_ErrorOutOfRange
oboe_Result_ErrorTimeout
oboe_Result_ErrorUnavailable
oboe_Result_ErrorUnimplemented
oboe_Result_ErrorWouldBlock
oboe_Result_OK
oboe_Result_Reserved1
oboe_Result_Reserved2
oboe_Result_Reserved3
oboe_Result_Reserved4
oboe_Result_Reserved5
oboe_Result_Reserved6
oboe_Result_Reserved7
oboe_Result_Reserved8
oboe_Result_Reserved9
oboe_Result_Reserved10
oboe_SampleRateConversionQuality_Best

Highest quality conversion, which may be expensive in terms of CPU.

oboe_SampleRateConversionQuality_Fastest

Fastest conversion but may not sound great. This may be implemented using bilinear interpolation.

oboe_SampleRateConversionQuality_High

Fastest conversion but may not sound great. This may be implemented using bilinear interpolation.

oboe_SampleRateConversionQuality_Low

Fastest conversion but may not sound great. This may be implemented using bilinear interpolation.

oboe_SampleRateConversionQuality_Medium

Fastest conversion but may not sound great. This may be implemented using bilinear interpolation.

oboe_SampleRateConversionQuality_None

No conversion by Oboe. Underlying APIs may still do conversion.

oboe_SessionId_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.

oboe_SessionId_None

Do not allocate a session ID. Effects cannot be used with this stream. Default.

oboe_SharingMode_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.

oboe_SharingMode_Shared

Multiple applications can share the same device. The data from output streams will be mixed by the audio service. The data for input streams will be distributed by the audio service.

oboe_StreamState_Closed
oboe_StreamState_Closing
oboe_StreamState_Disconnected
oboe_StreamState_Flushed
oboe_StreamState_Flushing
oboe_StreamState_Open
oboe_StreamState_Paused
oboe_StreamState_Pausing
oboe_StreamState_Started
oboe_StreamState_Starting
oboe_StreamState_Stopped
oboe_StreamState_Stopping
oboe_StreamState_Uninitialized
oboe_StreamState_Unknown
oboe_Usage_Alarm

Use this to demand the users attention.

oboe_Usage_AssistanceAccessibility

Use this for screen readers, etcetera.

oboe_Usage_AssistanceNavigationGuidance

Use this for driving or navigation directions.

oboe_Usage_AssistanceSonification

Use this for user interface sounds, beeps, etcetera.

oboe_Usage_Assistant

Use this for audio responses to user queries, audio instructions or help utterances.

oboe_Usage_Game

Use this for game audio and sound effects.

oboe_Usage_Media

Use this for streaming media, music performance, video, podcasts, etcetera.

oboe_Usage_Notification

Use this for notifying the user when a message has arrived or some other background event has occured.

oboe_Usage_NotificationEvent

Use this to attract the users attention when, for example, the battery is low.

oboe_Usage_NotificationRingtone

Use this when the phone rings.

oboe_Usage_VoiceCommunication

Use this for voice over IP, telephony, etcetera.

oboe_Usage_VoiceCommunicationSignalling

Use this for sounds associated with telephony such as busy tones, DTMF, etcetera.

oboe_Version_Major
oboe_Version_Minor
oboe_Version_Number
oboe_Version_Patch
oboe_Version_Text

Statics

oboe_DefaultStreamValues_ChannelCount
oboe_DefaultStreamValues_FramesPerBurst
oboe_DefaultStreamValues_SampleRate

Functions

oboe_AudioStreamBuilder_delete
oboe_AudioStreamBuilder_getAudioApi
oboe_AudioStreamBuilder_getBase
oboe_AudioStreamBuilder_isAAudioRecommended

Is the AAudio API recommended this device?

oboe_AudioStreamBuilder_isAAudioSupported

Is the AAudio API supported on this device?

oboe_AudioStreamBuilder_new
oboe_AudioStreamBuilder_openStream

Create and open a stream object based on the current settings.

oboe_AudioStreamBuilder_setAudioApi
oboe_AudioStreamBuilder_setCallback
oboe_AudioStreamCallbackWrapper_AudioStreamCallbackWrapper
oboe_AudioStreamCallbackWrapper_delete
oboe_AudioStreamCallbackWrapper_new
oboe_AudioStreamCallbackWrapper_onAudioReady
oboe_AudioStreamCallbackWrapper_onErrorAfterClose
oboe_AudioStreamCallbackWrapper_onErrorBeforeClose
oboe_AudioStreamCallbackWrapper_setContext
oboe_AudioStream_AudioStream

Construct an AudioStream using the given AudioStreamBuilder

oboe_AudioStream_calculateLatencyMillis
oboe_AudioStream_close

Close the stream and deallocate any resources from the open() call.

oboe_AudioStream_delete
oboe_AudioStream_fireDataCallback

Override this to provide your own behaviour for the audio callback

oboe_AudioStream_flush

Flush the stream. This will block until the stream has been flushed, an error occurs or timeoutNanoseconds has been reached.

oboe_AudioStream_getAudioApi
oboe_AudioStream_getAvailableFrames

@return number of frames of data currently in the buffer

oboe_AudioStream_getBase
oboe_AudioStream_getBytesPerSample

Get the number of bytes per sample. This is calculated using the sample format. For example, a stream using 16-bit integer samples will have 2 bytes per sample.

oboe_AudioStream_getFramesPerBurst
oboe_AudioStream_getFramesRead

The number of audio frames read from the stream. This monotonic counter will never get reset.

oboe_AudioStream_getFramesWritten

The number of audio frames written into the stream. This monotonic counter will never get reset.

oboe_AudioStream_getState
oboe_AudioStream_getTimestamp

Get the estimated time that the frame at framePosition entered or left the audio processing pipeline.

oboe_AudioStream_getXRunCount
oboe_AudioStream_isXRunCountSupported
oboe_AudioStream_launchStopThread

Launch a thread that will stop the stream.

oboe_AudioStream_open
oboe_AudioStream_pause

Pause the stream. This will block until the stream has been paused, an error occurs or timeoutNanoseconds has been reached.

oboe_AudioStream_read
oboe_AudioStream_requestFlush
oboe_AudioStream_requestPause
oboe_AudioStream_requestStart
oboe_AudioStream_requestStop
oboe_AudioStream_setBufferSizeInFrames
oboe_AudioStream_start

Start the stream. This will block until the stream has been started, an error occurs or timeoutNanoseconds has been reached.

oboe_AudioStream_stop

Stop the stream. This will block until the stream has been stopped, an error occurs or timeoutNanoseconds has been reached.

oboe_AudioStream_waitForAvailableFrames

Wait until the stream has a minimum amount of data available in its buffer. This can be used with an EXCLUSIVE MMAP input stream to avoid reading data too close to the DSP write position, which may cause glitches.

oboe_AudioStream_waitForStateChange
oboe_AudioStream_waitForStateTransition

Wait for a transition from one state to another. @return OK if the endingState was observed, or ErrorUnexpectedState if any state that was not the startingState or endingState was observed or ErrorTimeout.

oboe_AudioStream_write
oboe_LatencyTuner_LatencyTuner

Construct a new LatencyTuner object which will act on the given audio stream

oboe_LatencyTuner_LatencyTuner1

Construct a new LatencyTuner object which will act on the given audio stream.

oboe_LatencyTuner_isAtMaximumBufferSize

@return true if the audio stream's buffer size is at the maximum value. If no maximum value was specified when constructing the LatencyTuner then the value of stream->getBufferCapacityInFrames is used

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.

oboe_LatencyTuner_tune

Adjust the bufferSizeInFrames to optimize latency. It will start with a low latency and then raise it if an underrun occurs.

oboe_StabilizedCallback_StabilizedCallback
oboe_StabilizedCallback_onAudioReady
oboe_getSdkVersion

Return the version of the SDK that is currently running.

Type Definitions

__clockid_t
__int32_t
__int64_t
__kernel_clockid_t
__uint8_t
__uint16_t
__uint32_t
clockid_t
oboe_AudioApi

The underlying audio API used by the audio stream.

oboe_AudioFormat

The format of audio samples.

oboe_AudioReadyHandler
oboe_ChannelCount

The channel count of the audio stream. The underlying type is int32_t. Use of this enum is convenient to avoid "magic" numbers when specifying the channel count.

oboe_ContentType

The ContentType 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 {@link Movie} for a movie streaming service or {@link Speech} for an audio book application) this information might be used by the audio framework to enforce audio focus.

oboe_DataCallbackResult

The result of an audio callback.

oboe_Direction

The direction of the stream.

oboe_ErrorCloseHandler
oboe_InputPreset

Defines the audio source. An audio source defines both a default physical source of audio signal, and a recording configuration.

oboe_LatencyTuner_State
oboe_PerformanceMode

The performance mode of the audio stream.

oboe_Result

The result of an operation. All except the OK result indicates that an error occurred. The Result can be converted into a human readable string using convertToText.

oboe_SampleRateConversionQuality

Specifies the quality of the sample rate conversion performed by Oboe. Higher quality will require more CPU load. Higher quality conversion will probably be implemented using a sinc based resampler.

oboe_SessionId

This attribute can be used to allocate a session ID to the audio stream.

oboe_SharingMode

The sharing mode of the audio stream.

oboe_StreamState

The state of the audio stream.

oboe_Usage

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.

size_t