From 851c4a0b3615234ff3930389dd666205c2863c64 Mon Sep 17 00:00:00 2001 From: Michal Ratajsky Date: Tue, 5 Jan 2016 11:14:12 +0100 Subject: pulse: Turn a macro into a function and provide error checking --- backends/pulse/pulse-stream-control.h | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'backends/pulse/pulse-stream-control.h') diff --git a/backends/pulse/pulse-stream-control.h b/backends/pulse/pulse-stream-control.h index ae1bb26..07d297c 100644 --- a/backends/pulse/pulse-stream-control.h +++ b/backends/pulse/pulse-stream-control.h @@ -41,9 +41,6 @@ G_BEGIN_DECLS #define PULSE_STREAM_CONTROL_GET_CLASS(o) \ (G_TYPE_INSTANCE_GET_CLASS ((o), PULSE_TYPE_STREAM_CONTROL, PulseStreamControlClass)) -#define PULSE_STREAM_CONTROL_GET_STREAM_INDEX(psc) \ - (pulse_stream_get_index (PULSE_STREAM (mate_mixer_stream_control_get_stream (MATE_MIXER_STREAM_CONTROL (psc))))) - typedef struct _PulseStreamControlClass PulseStreamControlClass; typedef struct _PulseStreamControlPrivate PulseStreamControlPrivate; @@ -68,25 +65,26 @@ struct _PulseStreamControlClass PulseMonitor *(*create_monitor) (PulseStreamControl *control); }; -GType pulse_stream_control_get_type (void) G_GNUC_CONST; +GType pulse_stream_control_get_type (void) G_GNUC_CONST; -guint32 pulse_stream_control_get_index (PulseStreamControl *control); +guint32 pulse_stream_control_get_index (PulseStreamControl *control); +guint32 pulse_stream_control_get_stream_index (PulseStreamControl *control); -PulseConnection * pulse_stream_control_get_connection (PulseStreamControl *control); -PulseMonitor * pulse_stream_control_get_monitor (PulseStreamControl *control); +PulseConnection * pulse_stream_control_get_connection (PulseStreamControl *control); +PulseMonitor * pulse_stream_control_get_monitor (PulseStreamControl *control); -const pa_cvolume * pulse_stream_control_get_cvolume (PulseStreamControl *control); -const pa_channel_map *pulse_stream_control_get_channel_map (PulseStreamControl *control); +const pa_cvolume * pulse_stream_control_get_cvolume (PulseStreamControl *control); +const pa_channel_map *pulse_stream_control_get_channel_map (PulseStreamControl *control); -void pulse_stream_control_set_app_info (PulseStreamControl *stream, - MateMixerAppInfo *info, - gboolean take); +void pulse_stream_control_set_app_info (PulseStreamControl *stream, + MateMixerAppInfo *info, + gboolean take); -void pulse_stream_control_set_channel_map (PulseStreamControl *control, - const pa_channel_map *map); -void pulse_stream_control_set_cvolume (PulseStreamControl *control, - const pa_cvolume *cvolume, - pa_volume_t base_volume); +void pulse_stream_control_set_channel_map (PulseStreamControl *control, + const pa_channel_map *map); +void pulse_stream_control_set_cvolume (PulseStreamControl *control, + const pa_cvolume *cvolume, + pa_volume_t base_volume); G_END_DECLS -- cgit v1.2.1