summaryrefslogtreecommitdiffstats
path: root/src/modules/module-tunnel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/module-tunnel.c')
-rw-r--r--src/modules/module-tunnel.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 61b9516a..5c7a6e55 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -1056,10 +1056,10 @@ static void sink_input_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag
pa_assert(u->sink);
if ((u->version < 11 || !!mute == !!u->sink->muted) &&
- pa_cvolume_equal(&volume, &u->sink->volume))
+ pa_cvolume_equal(&volume, &u->sink->virtual_volume))
return;
- memcpy(&u->sink->volume, &volume, sizeof(pa_cvolume));
+ memcpy(&u->sink->virtual_volume, &volume, sizeof(pa_cvolume));
if (u->version >= 11)
u->sink->muted = !!mute;
@@ -1621,7 +1621,7 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
#ifdef TUNNEL_SINK
/* Called from main context */
-static int sink_set_volume(pa_sink *sink) {
+static void sink_set_volume(pa_sink *sink) {
struct userdata *u;
pa_tagstruct *t;
uint32_t tag;
@@ -1634,14 +1634,12 @@ static int sink_set_volume(pa_sink *sink) {
pa_tagstruct_putu32(t, PA_COMMAND_SET_SINK_INPUT_VOLUME);
pa_tagstruct_putu32(t, tag = u->ctag++);
pa_tagstruct_putu32(t, u->device_index);
- pa_tagstruct_put_cvolume(t, &sink->volume);
+ pa_tagstruct_put_cvolume(t, &sink->virtual_volume);
pa_pstream_send_tagstruct(u->pstream, t);
-
- return 0;
}
/* Called from main context */
-static int sink_set_mute(pa_sink *sink) {
+static void sink_set_mute(pa_sink *sink) {
struct userdata *u;
pa_tagstruct *t;
uint32_t tag;
@@ -1651,7 +1649,7 @@ static int sink_set_mute(pa_sink *sink) {
pa_assert(u);
if (u->version < 11)
- return -1;
+ return;
t = pa_tagstruct_new(NULL, 0);
pa_tagstruct_putu32(t, PA_COMMAND_SET_SINK_INPUT_MUTE);
@@ -1659,8 +1657,6 @@ static int sink_set_mute(pa_sink *sink) {
pa_tagstruct_putu32(t, u->device_index);
pa_tagstruct_put_boolean(t, !!sink->muted);
pa_pstream_send_tagstruct(u->pstream, t);
-
- return 0;
}
#endif