[−][src]Crate aaudio_sys
Enums
AAudioStream | Low-level wrappers for AAudio API. |
AAudioStreamBuilder |
Constants
Functions
AAudioStreamBuilder_delete⚠ | Delete the resources associated with the StreamBuilder. Returns 0 for OK or a negative error. |
AAudioStreamBuilder_openStream⚠ | Open a stream based on the options in the StreamBuilder. Returns 0 for OK or a negative error. |
AAudioStreamBuilder_setAllowedCapturePolicy⚠ | Specify whether this stream audio may or may not be captured by other apps or the system. |
AAudioStreamBuilder_setBufferCapacityInFrames⚠ | Set the requested buffer capacity in frames. The final AAudioStream capacity may differ, but will probably be at least this big. |
AAudioStreamBuilder_setChannelCount⚠ | Request a number of channels for the stream. |
AAudioStreamBuilder_setContentType⚠ | Set the type of audio data that the stream will carry. |
AAudioStreamBuilder_setDataCallback⚠ | Request that AAudio call this functions when the stream is running. |
AAudioStreamBuilder_setDeviceId⚠ | Request an audio device identified device using an ID. On Android, for example, the ID could be obtained from the Java AudioManager. |
AAudioStreamBuilder_setDirection⚠ | Request the direction for a stream. |
AAudioStreamBuilder_setErrorCallback⚠ | Request that AAudio call this function if any error occurs or the stream is disconnected. |
AAudioStreamBuilder_setFormat⚠ | Request a sample data format, for example |
AAudioStreamBuilder_setFramesPerDataCallback⚠ | Set the requested data callback buffer size in frames.
See |
AAudioStreamBuilder_setInputPreset⚠ | Set the input (capture) preset for the stream. |
AAudioStreamBuilder_setPerformanceMode⚠ | Set the requested performance mode. |
AAudioStreamBuilder_setPrivacySensitive⚠ | Indicates whether this input stream must be marked as privacy sensitive or not. |
AAudioStreamBuilder_setSampleRate⚠ | Request a sample rate in Hertz. |
AAudioStreamBuilder_setSessionId⚠ | The session ID can be used to associate a stream with effects processors. The effects are controlled using the Android AudioEffect Java API. |
AAudioStreamBuilder_setSharingMode⚠ | Request a mode for sharing the device. |
AAudioStreamBuilder_setUsage⚠ | Set the intended use case for the stream. |
AAudioStream_close⚠ | Delete the internal data structures associated with the stream created by AAudioStreamBuilder_openStream(). |
AAudioStream_getBufferCapacityInFrames⚠ | Query maximum buffer capacity in frames. |
AAudioStream_getBufferSizeInFrames⚠ | Query the maximum number of frames that can be filled without blocking. |
AAudioStream_getChannelCount⚠ | A stream has one or more channels of data. A frame will contain one sample for each channel. |
AAudioStream_getDeviceId⚠ | Available since API level 26. Returns the actual device ID. |
AAudioStream_getDirection⚠ | Available since API level 26. |
AAudioStream_getFormat⚠ | Available since API level 26. Returns the actual data format. |
AAudioStream_getFramesPerBurst⚠ | Query the number of frames that the application should read or write at one time for optimal performance. It is OK if an application writes a different number of frames. But the buffer size may need to be larger in order to avoid underruns or overruns. |
AAudioStream_getFramesPerDataCallback⚠ | Query the size of the buffer that will be passed to the dataProc callback in the numFrames parameter. |
AAudioStream_getFramesRead⚠ | Passes back the number of frames that have been read since the stream was created. For an output stream, this will be advanced by the endpoint. For an input stream, this will be advanced by the application calling read() or by a data callback. |
AAudioStream_getFramesWritten⚠ | Passes back the number of frames that have been written since the stream was created. For an output stream, this will be advanced by the application calling write() or by a data callback. For an input stream, this will be advanced by the endpoint. |
AAudioStream_getPerformanceMode⚠ | Get the performance mode used by the stream. |
AAudioStream_getSampleRate⚠ | Available since API level 26. Returns the actual sample rate. |
AAudioStream_getSessionId⚠ | Passes back the session ID associated with this stream. |
AAudioStream_getSharingMode⚠ | Provide actual sharing mode. |
AAudioStream_getState⚠ | Query the current state of the client, eg. |
AAudioStream_getTimestamp⚠ | Passes back the time at which a particular frame was presented. This can be used to synchronize audio with video or MIDI. It can also be used to align a recorded stream with a playback stream. Returns 0 for OK or a negative error. |
AAudioStream_getXRunCount⚠ | 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. |
AAudioStream_read⚠ | Read data from the stream. Returns the number of frames actually read or a negative error. |
AAudioStream_release⚠ | Free the audio resources associated with a stream created by AAudioStreamBuilder_openStream(). AAudioStream_close() should be called at some point after calling this function. |
AAudioStream_requestFlush⚠ | Asynchronous request for the stream to flush.
Flushing will discard any pending data.
This call only works if the stream is pausing or paused.
Frame counters are not reset by a flush. They may be advanced.
After this call the state will be in |
AAudioStream_requestPause⚠ | Asynchronous request for the stream to pause.
Pausing a stream will freeze the data flow but not flush any buffers.
Use AAudioStream_requestStart() to resume playback after a pause.
After this call the state will be in |
AAudioStream_requestStart⚠ | Asynchronously request to start playing the stream. For output streams, one should
write to the stream to fill the buffer before starting.
Otherwise it will underflow.
After this call the state will be in |
AAudioStream_requestStop⚠ | Asynchronous request for the stream to stop.
The stream will stop after all of the data currently buffered has been played.
After this call the state will be in |
AAudioStream_setBufferSizeInFrames⚠ | This can be used to adjust the latency of the buffer by changing the threshold where blocking will occur. By combining this with AAudioStream_getXRunCount(), the latency can be tuned at run-time for each device. Returns actual buffer size in frames or a negative error. |
AAudioStream_waitForStateChange⚠ | Wait until the current state no longer matches the input state. |
AAudioStream_write⚠ | Write data to the stream. Returns the number of frames actually written or a negative error. |
AAudio_createStreamBuilder⚠ | Create a StreamBuilder that can be used to open a Stream. |
Type Definitions
DataCallback | Prototype for the data function that is passed to AAudioStreamBuilder_setDataCallback(). |
ErrorCallback | Prototype for the callback function that is passed to AAudioStreamBuilder_setErrorCallback(). |