diff options
author | Michal Ratajsky <[email protected]> | 2014-11-08 20:31:26 +0100 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2014-11-08 20:31:26 +0100 |
commit | 6d156916d8455cb8edef0e90020026d395dd82a0 (patch) | |
tree | 1d0b895eb122cac84cf8a59134dd00d772c280de /backends/oss/oss-switch.c | |
parent | 69b3a5c03321071ebc640d66e98bbf41c709938a (diff) | |
download | libmatemixer-6d156916d8455cb8edef0e90020026d395dd82a0.tar.bz2 libmatemixer-6d156916d8455cb8edef0e90020026d395dd82a0.tar.xz |
oss: Use MateMixerStreamSwitch
Diffstat (limited to 'backends/oss/oss-switch.c')
-rw-r--r-- | backends/oss/oss-switch.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/backends/oss/oss-switch.c b/backends/oss/oss-switch.c index 682814b..40527b9 100644 --- a/backends/oss/oss-switch.c +++ b/backends/oss/oss-switch.c @@ -22,6 +22,7 @@ #include <libmatemixer/matemixer-private.h> #include "oss-common.h" +#include "oss-stream.h" #include "oss-switch.h" #include "oss-switch-option.h" @@ -31,12 +32,12 @@ struct _OssSwitchPrivate GList *options; }; -static void oss_switch_class_init (OssSwitchClass *klass); -static void oss_switch_init (OssSwitch *swtch); -static void oss_switch_dispose (GObject *object); -static void oss_switch_finalize (GObject *object); +static void oss_switch_class_init (OssSwitchClass *klass); +static void oss_switch_init (OssSwitch *swtch); +static void oss_switch_dispose (GObject *object); +static void oss_switch_finalize (GObject *object); -G_DEFINE_TYPE (OssSwitch, oss_switch, MATE_MIXER_TYPE_SWITCH) +G_DEFINE_TYPE (OssSwitch, oss_switch, MATE_MIXER_TYPE_STREAM_SWITCH) static gboolean oss_switch_set_active_option (MateMixerSwitch *mms, MateMixerSwitchOption *mmso); @@ -99,13 +100,15 @@ oss_switch_finalize (GObject *object) } OssSwitch * -oss_switch_new (const gchar *name, +oss_switch_new (OssStream *stream, + const gchar *name, const gchar *label, gint fd, GList *options) { OssSwitch *swtch; + g_return_val_if_fail (OSS_IS_STREAM (stream), NULL); g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (label != NULL, NULL); g_return_val_if_fail (fd != -1, NULL); @@ -115,6 +118,7 @@ oss_switch_new (const gchar *name, "name", name, "label", label, "role", MATE_MIXER_SWITCH_ROLE_PORT, + "stream", stream, NULL); /* Takes ownership of options */ |