From bec5d6e03388a07d9d58a8564f665782231ef8ec Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 14 May 2007 10:46:28 +0000 Subject: * change signature of volume setters to include the size of the array * s/output/write/g, s/input/read/g * make "client_name" mandatory again git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@13 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce --- sydney.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'sydney.h') diff --git a/sydney.h b/sydney.h index 58d7a88..401eac5 100644 --- a/sydney.h +++ b/sydney.h @@ -111,11 +111,11 @@ typedef enum { /** Possible events for notifications */ typedef enum { - SA_NOTIFY_REQUEST_STOP, SA_NOTIFY_REQUEST_START, - SA_NOTIFY_VOLUME_CHANGED_IN, - SA_NOTIFY_VOLUME_CHANGED_OUT, - SA_NOTIFY_DEVICE_CHANGED, + SA_NOTIFY_REQUEST_STOP, + SA_NOTIFY_CHANGED_READ_VOLUME, + SA_NOTIFY_CHANGED_WRITE_VOLUME, + SA_NOTIFY_CHANGED_DEVICE, _SA_NOTIFY_MAX } sa_notify_t; @@ -235,10 +235,10 @@ typedef enum { typedef int (*sa_event_callback_t)(sa_stream_t *s, sa_event_t event); /** Create an opaque (e.g. AC3) codec stream */ -int sa_stream_create_opaque(sa_stream_t **s, sa_mode_t mode, const char *codec); +int sa_stream_create_opaque(sa_stream_t **s, const char *client_name, sa_mode_t mode, const char *codec); /** Normal way to open a PCM device */ -int sa_stream_create_pcm(sa_stream_t **s, sa_mode_t mode, sa_pcm_format_t format, unsigned rate, unsigned nchannels); +int sa_stream_create_pcm(sa_stream_t **s, const char *client_name, sa_mode_t mode, sa_pcm_format_t format, unsigned rate, unsigned nchannels); /** Initialise the device */ int sa_stream_open(sa_stream_t *s); @@ -253,7 +253,7 @@ int sa_stream_set_write_upper_watermark(sa_stream_t *s, size_t size); int sa_stream_set_read_upper_watermark(sa_stream_t *s, size_t size); /** Set the mapping between channels and the loudspeakers */ -int sa_stream_set_channel_map(sa_stream_t *s, const sa_channel_t map[]); +int sa_stream_set_channel_map(sa_stream_t *s, const sa_channel_t map[], unsigned n); /** Whether xruns cause the card to reset */ int sa_stream_set_xrun_mode(sa_stream_t *s, sa_xrun_mode_t mode); @@ -274,10 +274,10 @@ int sa_stream_start_thread(sa_stream_t *s, sa_event_callback_t *callback); int sa_stream_change_device(sa_stream_t *s, const char *device_name); /** volume in hundreths of dB*/ -int sa_stream_change_input_volume(sa_stream_t *s, const int32_t vol[]); +int sa_stream_change_read_volume(sa_stream_t *s, const int32_t vol[], unsigned n); /** volume in hundreths of dB*/ -int sa_stream_change_output_volume(sa_stream_t *s, const int32_t vol[]); +int sa_stream_change_write_volume(sa_stream_t *s, const int32_t vol[], unsigned n); /** Change the sampling rate */ int sa_stream_change_rate(sa_stream_t *s, unsigned rate); @@ -311,8 +311,8 @@ int sa_stream_get_non_interleaved(sa_stream_t *s, int *enabled); int sa_stream_get_dynamic_rate(sa_stream_t *s, int *enabled); int sa_stream_get_driver(sa_stream_t *s, const char **driver); int sa_stream_get_device(sa_stream_t *s, const char **device_name); -int sa_stream_get_input_volume(sa_stream_t *s, const int32_t *vol[]); -int sa_stream_get_output_volume(sa_stream_t *s, const int32_t *vol[]); +int sa_stream_get_read_volume(sa_stream_t *s, const int32_t *vol[]); +int sa_stream_get_write_volume(sa_stream_t *s, const int32_t *vol[]); int sa_stream_get_meta_data(sa_stream_t *s, const char *name, const void **data, size_t *size); int sa_stream_get_adjust_rate(sa_stream_t *s, sa_adjust_t *direction); int sa_stream_get_adjust_nchannels(sa_stream_t *s, sa_adjust_t *direction); -- cgit