summaryrefslogtreecommitdiff
path: root/backends/pulse/pulse-ext-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/pulse/pulse-ext-stream.c')
-rw-r--r--backends/pulse/pulse-ext-stream.c41
1 files changed, 5 insertions, 36 deletions
diff --git a/backends/pulse/pulse-ext-stream.c b/backends/pulse/pulse-ext-stream.c
index 96164e8..b00e967 100644
--- a/backends/pulse/pulse-ext-stream.c
+++ b/backends/pulse/pulse-ext-stream.c
@@ -30,8 +30,6 @@
#include "pulse-client-stream.h"
#include "pulse-ext-stream.h"
#include "pulse-helpers.h"
-#include "pulse-sink.h"
-#include "pulse-source.h"
#include "pulse-stream.h"
static void pulse_ext_stream_class_init (PulseExtStreamClass *klass);
@@ -189,16 +187,10 @@ pulse_ext_stream_set_mute (PulseStream *pstream, gboolean mute)
info.mute = mute;
map = pulse_stream_get_channel_map (pstream);
- if (map != NULL)
- info.channel_map = *map;
- else
- pa_channel_map_init (&info.channel_map);
+ info.channel_map = *map;
cvolume = pulse_stream_get_cvolume (pstream);
- if (cvolume != NULL)
- info.volume = *cvolume;
- else
- pa_cvolume_init (&info.volume);
+ info.volume = *cvolume;
parent = mate_mixer_client_stream_get_parent (MATE_MIXER_CLIENT_STREAM (pstream));
if (parent != NULL)
@@ -223,10 +215,7 @@ pulse_ext_stream_set_volume (PulseStream *pstream, pa_cvolume *cvolume)
info.mute = mate_mixer_stream_get_mute (MATE_MIXER_STREAM (pstream));
map = pulse_stream_get_channel_map (pstream);
- if (map != NULL)
- info.channel_map = *map;
- else
- pa_channel_map_init (&info.channel_map);
+ info.channel_map = *map;
parent = mate_mixer_client_stream_get_parent (MATE_MIXER_CLIENT_STREAM (pstream));
if (parent != NULL)
@@ -242,7 +231,6 @@ pulse_ext_stream_set_volume (PulseStream *pstream, pa_cvolume *cvolume)
static gboolean
pulse_ext_stream_set_parent (PulseClientStream *pclient, PulseStream *parent)
{
- MateMixerStreamFlags flags;
PulseStream *pstream;
const pa_channel_map *map;
const pa_cvolume *cvolume;
@@ -251,35 +239,16 @@ pulse_ext_stream_set_parent (PulseClientStream *pclient, PulseStream *parent)
g_return_val_if_fail (PULSE_IS_EXT_STREAM (pclient), FALSE);
g_return_val_if_fail (PULSE_IS_STREAM (parent), FALSE);
- flags = mate_mixer_stream_get_flags (MATE_MIXER_STREAM (pclient));
-
- /* Validate the parent stream */
- if (flags & MATE_MIXER_STREAM_INPUT && !PULSE_IS_SOURCE (parent)) {
- g_warning ("Could not change stream parent to %s: not a parent input stream",
- mate_mixer_stream_get_name (MATE_MIXER_STREAM (parent)));
- return FALSE;
- } else if (!PULSE_IS_SINK (parent)) {
- g_warning ("Could not change stream parent to %s: not a parent output stream",
- mate_mixer_stream_get_name (MATE_MIXER_STREAM (parent)));
- return FALSE;
- }
-
pstream = PULSE_STREAM (pclient);
info.name = mate_mixer_stream_get_name (MATE_MIXER_STREAM (pstream));
info.mute = mate_mixer_stream_get_mute (MATE_MIXER_STREAM (pstream));
map = pulse_stream_get_channel_map (pstream);
- if (map != NULL)
- info.channel_map = *map;
- else
- pa_channel_map_init (&info.channel_map);
+ info.channel_map = *map;
cvolume = pulse_stream_get_cvolume (pstream);
- if (cvolume != NULL)
- info.volume = *cvolume;
- else
- pa_cvolume_init (&info.volume);
+ info.volume = *cvolume;
info.device = mate_mixer_stream_get_name (MATE_MIXER_STREAM (parent));