diff options
author | Michal Ratajsky <[email protected]> | 2014-07-20 10:39:43 +0200 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2014-07-20 10:39:43 +0200 |
commit | 7396148c328d9f2a0d933374547c7e93a46b8efa (patch) | |
tree | 6f826bed322a42bb2478970d42abc4ea47d83d82 /backends/pulse | |
parent | 32049d16801b8c0b53448eba4b41df8765a94f84 (diff) | |
download | libmatemixer-7396148c328d9f2a0d933374547c7e93a46b8efa.tar.bz2 libmatemixer-7396148c328d9f2a0d933374547c7e93a46b8efa.tar.xz |
Volume and channel map are always present in PulseStream
Diffstat (limited to 'backends/pulse')
-rw-r--r-- | backends/pulse/pulse-ext-stream.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/backends/pulse/pulse-ext-stream.c b/backends/pulse/pulse-ext-stream.c index a12a22a..b00e967 100644 --- a/backends/pulse/pulse-ext-stream.c +++ b/backends/pulse/pulse-ext-stream.c @@ -187,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) @@ -221,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) @@ -254,16 +245,10 @@ pulse_ext_stream_set_parent (PulseClientStream *pclient, PulseStream *parent) 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)); |