diff options
Diffstat (limited to 'backends/alsa/alsa-stream-input-control.c')
-rw-r--r-- | backends/alsa/alsa-stream-input-control.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/backends/alsa/alsa-stream-input-control.c b/backends/alsa/alsa-stream-input-control.c index 1954008..5f5e90e 100644 --- a/backends/alsa/alsa-stream-input-control.c +++ b/backends/alsa/alsa-stream-input-control.c @@ -25,6 +25,7 @@ #include "alsa-compat.h" #include "alsa-constants.h" #include "alsa-element.h" +#include "alsa-stream.h" #include "alsa-stream-control.h" #include "alsa-stream-input-control.h" @@ -82,6 +83,11 @@ alsa_stream_input_control_new (const gchar *name, MateMixerStreamControlRole role, AlsaStream *stream) { + + g_return_val_if_fail (name != NULL, NULL); + g_return_val_if_fail (label != NULL, NULL); + g_return_val_if_fail (ALSA_IS_STREAM (stream), NULL); + return g_object_new (ALSA_TYPE_STREAM_INPUT_CONTROL, "name", name, "label", label, @@ -133,7 +139,7 @@ alsa_stream_input_control_set_mute (AlsaStreamControl *control, gboolean mute) snd_mixer_elem_t *el; gint ret; - g_return_val_if_fail (ALSA_IS_STREAM_CONTROL (control), FALSE); + g_return_val_if_fail (ALSA_IS_STREAM_INPUT_CONTROL (control), FALSE); el = alsa_element_get_snd_element (ALSA_ELEMENT (control)); if G_UNLIKELY (el == NULL) @@ -154,7 +160,7 @@ alsa_stream_input_control_set_volume (AlsaStreamControl *control, guint volume) snd_mixer_elem_t *el; gint ret; - g_return_val_if_fail (ALSA_IS_STREAM_CONTROL (control), FALSE); + g_return_val_if_fail (ALSA_IS_STREAM_INPUT_CONTROL (control), FALSE); el = alsa_element_get_snd_element (ALSA_ELEMENT (control)); if G_UNLIKELY (el == NULL) @@ -177,7 +183,7 @@ alsa_stream_input_control_set_channel_volume (AlsaStreamControl *contr snd_mixer_elem_t *el; gint ret; - g_return_val_if_fail (ALSA_IS_STREAM_CONTROL (control), FALSE); + g_return_val_if_fail (ALSA_IS_STREAM_INPUT_CONTROL (control), FALSE); el = alsa_element_get_snd_element (ALSA_ELEMENT (control)); if G_UNLIKELY (el == NULL) @@ -202,7 +208,7 @@ alsa_stream_input_control_get_volume_from_decibel (AlsaStreamControl *control, glong value; gint ret; - g_return_val_if_fail (ALSA_IS_STREAM_CONTROL (control), FALSE); + g_return_val_if_fail (ALSA_IS_STREAM_INPUT_CONTROL (control), FALSE); el = alsa_element_get_snd_element (ALSA_ELEMENT (control)); if G_UNLIKELY (el == NULL) @@ -231,7 +237,7 @@ alsa_stream_input_control_get_decibel_from_volume (AlsaStreamControl *control, glong value; gint ret; - g_return_val_if_fail (ALSA_IS_STREAM_CONTROL (control), FALSE); + g_return_val_if_fail (ALSA_IS_STREAM_INPUT_CONTROL (control), FALSE); el = alsa_element_get_snd_element (ALSA_ELEMENT (control)); if G_UNLIKELY (el == NULL) |