41#ifndef ULTRALIGHT_CAPI_AUDIOOUTPUT_H
42#define ULTRALIGHT_CAPI_AUDIOOUTPUT_H
73 const float* samples,
unsigned int num_frames);
110 unsigned int stream_id);
void(*) ULAudioOutputFlushCallback(void *user_data, unsigned int stream_id)
The callback invoked when the media seeks, to discard a stream's buffered audio.
Definition CAPI_AudioOutput.h:91
void(*) ULAudioOutputSetPausedCallback(void *user_data, unsigned int stream_id, bool paused)
The callback invoked to pause or resume a stream.
Definition CAPI_AudioOutput.h:84
void(*) ULAudioOutputSetVolumeCallback(void *user_data, unsigned int stream_id, float volume)
The callback invoked to set a stream's volume, from 0.0 (silent) to 1.0 (full volume).
Definition CAPI_AudioOutput.h:78
void(*) ULAudioOutputStopCallback(void *user_data, unsigned int stream_id)
The callback invoked when no more samples are coming for a stream.
Definition CAPI_AudioOutput.h:97
ULAudioFormat(*) ULAudioOutputGetPreferredOutputFormatCallback(void *user_data)
The callback invoked to get the device's preferred audio format.
Definition CAPI_AudioOutput.h:115
void(*) ULAudioOutputPushSamplesCallback(void *user_data, unsigned int stream_id, const float *samples, unsigned int num_frames)
The callback invoked to push decoded PCM samples into a stream (num_frames * channels interleaved flo...
Definition CAPI_AudioOutput.h:72
unsigned long long(*) ULAudioOutputGetPlaybackPositionCallback(void *user_data, unsigned int stream_id)
The callback invoked to get the number of frames of a stream the device has played since the last flu...
Definition CAPI_AudioOutput.h:109
void(*) ULAudioOutputDestroyStreamCallback(void *user_data, unsigned int stream_id)
The callback invoked to destroy a stream and free its resources.
Definition CAPI_AudioOutput.h:102
void(*) ULAudioOutputCreateStreamCallback(void *user_data, unsigned int stream_id, ULAudioFormat format)
The callback invoked to create a new audio stream (before its first samples are pushed).
Definition CAPI_AudioOutput.h:65
Various defines and utility functions for the C API.
User-defined audio output interface.
Definition CAPI_AudioOutput.h:123
ULAudioOutputSetVolumeCallback set_volume
Called to set a stream's volume.
Definition CAPI_AudioOutput.h:142
void * user_data
A user-defined pointer passed to every callback (can be NULL).
Definition CAPI_AudioOutput.h:127
ULAudioOutputFlushCallback flush
Called to flush a stream on seek.
Definition CAPI_AudioOutput.h:152
ULAudioOutputStopCallback stop
Called when no more samples are coming for a stream.
Definition CAPI_AudioOutput.h:157
ULAudioOutputDestroyStreamCallback destroy_stream
Called to destroy a stream.
Definition CAPI_AudioOutput.h:162
ULAudioOutputSetPausedCallback set_paused
Called to pause or resume a stream.
Definition CAPI_AudioOutput.h:147
ULAudioOutputGetPlaybackPositionCallback get_playback_position
Called to read a stream's audio clock (can be NULL, in which case the position reads 0).
Definition CAPI_AudioOutput.h:167
ULAudioOutputGetPreferredOutputFormatCallback get_preferred_output_format
Called to read the device's preferred format (can be NULL, in which case it is stereo at 48000 Hz).
Definition CAPI_AudioOutput.h:173
ULAudioOutputCreateStreamCallback create_stream
Called to create a stream.
Definition CAPI_AudioOutput.h:132
ULAudioOutputPushSamplesCallback push_samples
Called to push samples into a stream.
Definition CAPI_AudioOutput.h:137