All sample cache related routines. More...
Go to the source code of this file.
Typedefs | |
typedef void(* | pa_context_play_sample_cb_t )(pa_context *c, uint32_t idx, void *userdata) |
Callback prototype for pa_context_play_sample_with_proplist(). | |
Functions | |
int | pa_stream_connect_upload (pa_stream *s, size_t length) |
Make this stream a sample upload stream. | |
int | pa_stream_finish_upload (pa_stream *s) |
Finish the sample upload, the stream name will become the sample name. | |
pa_operation * | pa_context_remove_sample (pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata) |
Remove a sample from the sample cache. | |
pa_operation * | pa_context_play_sample (pa_context *c, const char *name, const char *dev, pa_volume_t volume, pa_context_success_cb_t cb, void *userdata) |
Play a sample from the sample cache to the specified device. | |
pa_operation * | pa_context_play_sample_with_proplist (pa_context *c, const char *name, const char *dev, pa_volume_t volume, pa_proplist *proplist, pa_context_play_sample_cb_t cb, void *userdata) |
Play a sample from the sample cache to the specified device, allowing specification of a property list for the playback stream. |
All sample cache related routines.
See also Sample Cache
typedef void(* pa_context_play_sample_cb_t)(pa_context *c, uint32_t idx, void *userdata) |
Callback prototype for pa_context_play_sample_with_proplist().
The idx value is the index of the sink input object, or PA_INVALID_INDEX on failure.
pa_operation* pa_context_play_sample | ( | pa_context * | c, |
const char * | name, | ||
const char * | dev, | ||
pa_volume_t | volume, | ||
pa_context_success_cb_t | cb, | ||
void * | userdata | ||
) |
Play a sample from the sample cache to the specified device.
If the latter is NULL use the default sink. Returns an operation object
c | Context |
name | Name of the sample to play |
dev | Sink to play this sample on |
volume | Volume to play this sample with. Starting with 0.9.15 you may pass here PA_VOLUME_INVALID which will leave the decision about the volume to the server side which is a good idea. |
cb | Call this function after successfully starting playback, or NULL |
userdata | Userdata to pass to the callback |
pa_operation* pa_context_play_sample_with_proplist | ( | pa_context * | c, |
const char * | name, | ||
const char * | dev, | ||
pa_volume_t | volume, | ||
pa_proplist * | proplist, | ||
pa_context_play_sample_cb_t | cb, | ||
void * | userdata | ||
) |
Play a sample from the sample cache to the specified device, allowing specification of a property list for the playback stream.
If the latter is NULL use the default sink. Returns an operation object.
c | Context |
name | Name of the sample to play |
dev | Sink to play this sample on |
volume | Volume to play this sample with. Starting with 0.9.15 you may pass here PA_VOLUME_INVALID which will leave the decision about the volume to the server side which is a good idea. |
proplist | Property list for this sound. The property list of the cached entry will be merged into this property list |
cb | Call this function after successfully starting playback, or NULL |
userdata | Userdata to pass to the callback |
pa_operation* pa_context_remove_sample | ( | pa_context * | c, |
const char * | name, | ||
pa_context_success_cb_t | cb, | ||
void * | userdata | ||
) |
Remove a sample from the sample cache.
Returns an operation object which may be used to cancel the operation while it is running
int pa_stream_connect_upload | ( | pa_stream * | s, |
size_t | length | ||
) |
Make this stream a sample upload stream.
int pa_stream_finish_upload | ( | pa_stream * | s ) |
Finish the sample upload, the stream name will become the sample name.
You cancel a sample upload by issuing pa_stream_disconnect()