XT-Audio
|
Stream queries and operation. More...
Go to the source code of this file.
Functions | |
void | XtStreamStop (XtStream *s) |
Stops an audio stream. More... | |
XtError | XtStreamStart (XtStream *s) |
Starts an audio stream. More... | |
void | XtStreamDestroy (XtStream *s) |
Destroys an audio stream. More... | |
void * | XtStreamGetHandle (XtStream const *s) |
Implementation-defined handle to the backend stream. More... | |
XtBool | XtStreamIsRunning (XtStream const *s) |
Query stream state. More... | |
const XtFormat * | XtStreamGetFormat (XtStream const *s) |
Get stream format. More... | |
XtBool | XtStreamIsInterleaved (XtStream const *s) |
Get stream interleaved mode. More... | |
XtError | XtStreamGetFrames (XtStream const *s, int32_t *frames) |
Get maximum stream buffer size. More... | |
XtError | XtStreamGetLatency (XtStream const *s, XtLatency *latency) |
Get the end-to-end latency, if supported by the system. More... | |
Stream queries and operation.
Contains functions to control (start/stop) audio streams and querying running audio streams for buffer size and latencies.
void XtStreamDestroy | ( | XtStream * | s | ) |
Destroys an audio stream.
s | the audio stream. |
It is ok to pass NULL. Stream should be stopped before it is destroyed.
This function may only be called from the main thread.
Get stream format.
s | the audio stream |
Note: for aggregate streams this format will contain the total number of input and output channels passed to XtServiceAggregateStream. Channel masks for aggregate streams will always be 0.
This function may be called from any thread.
Get maximum stream buffer size.
s | the audio stream. |
frames | on success, reveices the stream buffer size in frames. |
This value is constant for the lifetime of the stream. It may be used to pre-allocate any intermediate buffers the application may need.
This function may be called from any thread (to allow invocation from the stream callback).
void * XtStreamGetHandle | ( | XtStream const * | s | ) |
Implementation-defined handle to the backend stream.
ASIO: IASIO*
ALSA: snd_pcm_t*
JACK: jack_client_t*
WASAPI: IAudioClient*
PulseAudio: pa_simple*
DirectSound: IDirectSoundBuffer* / IDirectSoundCaptureBuffer*
This function may be called from any thread.
Get the end-to-end latency, if supported by the system.
s | the audio stream. |
latency | on success, receives the current input/output latency in milliseconds. When the service does not support latency information, latency->input and latency->output will be 0. |
This value may change during the lifetime of the stream. For aggregate streams, the maximum input and output latencies of any underlying stream, plus the latency of the aggregation buffer is reported. When any of the underlying streams does not support latency info, the latency of the entire aggregated stream is reported as unknown.
This function may be called from any thread (to allow invocation from the stream callback).
Get stream interleaved mode.
This function may be called from any thread.
Query stream state.
This function may be called from any thread.
Starts an audio stream.
s | the audio stream. |
When the stream is running the application-defined stream callback will be invoked whenever audio data is needed or available.
This function may only be called from the main thread.
Stops an audio stream.
s | the audio stream. |
This function may only be called from the main thread.