scache.h File Reference

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_operationpa_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_operationpa_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_operationpa_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.

Detailed Description

All sample cache related routines.


Typedef Documentation

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.

Since:
0.9.11

Function Documentation

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

Parameters:
c Context
Parameters:
name Name of the sample to play
Parameters:
dev Sink to play this sample on
Parameters:
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.
Parameters:
cb Call this function after successfully starting playback, or NULL
Parameters:
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.

Since:
0.9.11
Parameters:
c Context
Parameters:
name Name of the sample to play
Parameters:
dev Sink to play this sample on
Parameters:
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.
Parameters:
proplist Property list for this sound. The property list of the cached entry will be merged into this property list
Parameters:
cb Call this function after successfully starting playback, or NULL
Parameters:
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()

Generated on Mon Mar 14 00:07:24 2011 for PulseAudio by  doxygen 1.6.3