![]() |
Open Broadcaster Software
Free, open source software for live streaming and recording
|
Go to the source code of this file.
Data Structures | |
struct | pulseaudio_default_output |
struct | enum_cb |
Functions | |
void | get_default_id (char **id) |
bool | devices_match (const char *id1, const char *id2) |
int_fast32_t | pulseaudio_init () |
void | pulseaudio_unref () |
void | pulseaudio_lock () |
void | pulseaudio_unlock () |
void | pulseaudio_wait () |
void | pulseaudio_signal (int wait_for_accept) |
void | pulseaudio_accept () |
int_fast32_t | pulseaudio_get_source_info_list (pa_source_info_cb_t cb, void *userdata) |
int_fast32_t | pulseaudio_get_source_info (pa_source_info_cb_t cb, const char *name, void *userdata) |
int_fast32_t | pulseaudio_get_server_info (pa_server_info_cb_t cb, void *userdata) |
pa_stream * | pulseaudio_stream_new (const char *name, const pa_sample_spec *ss, const pa_channel_map *map) |
int_fast32_t | pulseaudio_connect_playback (pa_stream *s, const char *name, const pa_buffer_attr *attr, pa_stream_flags_t flags) |
void | pulseaudio_write_callback (pa_stream *p, pa_stream_request_cb_t cb, void *userdata) |
void | pulseaudio_set_underflow_callback (pa_stream *p, pa_stream_notify_cb_t cb, void *userdata) |
bool devices_match | ( | const char * | id1, |
const char * | id2 | ||
) |
void get_default_id | ( | char ** | id | ) |
void pulseaudio_accept | ( | ) |
Signal the waiting callback to return
This function is used in conjunction with pulseaudio_signal()
int_fast32_t pulseaudio_connect_playback | ( | pa_stream * | s, |
const char * | name, | ||
const pa_buffer_attr * | attr, | ||
pa_stream_flags_t | flags | ||
) |
Connect to a pulseaudio playback stream
s | pa_stream to connect to. NULL for default |
attr | pa_buffer_attr |
name | Device name. NULL for default device |
flags | pa_stream_flags_t |
int_fast32_t pulseaudio_get_server_info | ( | pa_server_info_cb_t | cb, |
void * | userdata | ||
) |
Request server information
The function will block until the operation was executed and the mainloop called the provided callback function.
int_fast32_t pulseaudio_get_source_info | ( | pa_source_info_cb_t | cb, |
const char * | name, | ||
void * | userdata | ||
) |
Request source information from a specific source
The function will block until the operation was executed and the mainloop called the provided callback function.
cb | pointer to the callback function |
name | the source name to get information for |
userdata | pointer to userdata the callback will be called with |
int_fast32_t pulseaudio_get_source_info_list | ( | pa_source_info_cb_t | cb, |
void * | userdata | ||
) |
Request source information
The function will block until the operation was executed and the mainloop called the provided callback function.
int_fast32_t pulseaudio_init | ( | ) |
Initialize the pulseaudio mainloop and increase the reference count
void pulseaudio_lock | ( | ) |
Lock the mainloop
In order to allow for multiple threads to use the same mainloop pulseaudio provides it's own locking mechanism. This function should be called before using any pulseaudio function that is in any way related to the mainloop or context.
void pulseaudio_set_underflow_callback | ( | pa_stream * | p, |
pa_stream_notify_cb_t | cb, | ||
void * | userdata | ||
) |
Sets a callback function for when an underflow happen
p | pa_stream to connect to. NULL for default |
cb | pa_stream_notify_cb_t |
userdata | pointer to userdata the callback will be called with |
void pulseaudio_signal | ( | int | wait_for_accept | ) |
Wait for accept signal from calling thread
This function tells the pulseaudio mainloop whether the data provided to the callback should be retained until the calling thread executes pulseaudio_accept()
If wait_for_accept is 0 the function returns and the data is freed.
pa_stream* pulseaudio_stream_new | ( | const char * | name, |
const pa_sample_spec * | ss, | ||
const pa_channel_map * | map | ||
) |
Create a new stream with the default properties
void pulseaudio_unlock | ( | ) |
Unlock the mainloop
void pulseaudio_unref | ( | ) |
Unreference the pulseaudio mainloop, when the reference count reaches zero the mainloop will automatically be destroyed
void pulseaudio_wait | ( | ) |
Wait for events to happen
This function should be called when waiting for an event to happen.
void pulseaudio_write_callback | ( | pa_stream * | p, |
pa_stream_request_cb_t | cb, | ||
void * | userdata | ||
) |
Sets a callback function for when data can be written to the stream
p | pa_stream to connect to. NULL for default |
cb | pa_stream_request_cb_t |
userdata | pointer to userdata the callback will be called with |