aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/modules/mixer/e_mod_main.c2
-rw-r--r--src/modules/mixer/emixer.c2
-rw-r--r--src/modules/mixer/lib/emix.c7
-rw-r--r--src/modules/mixer/lib/emix.h1
4 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index e00bfd971..209435e64 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -487,7 +487,7 @@ _slider_drag_stop_cb(void *data EINA_UNUSED, Evas_Object *obj,
{
EINA_SAFETY_ON_NULL_RETURN(mixer_context->sink_default);
Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default;
- int val = s->volume.volumes[0];
+ int val = s->set_volume.volumes[0];
elm_slider_value_set(obj, val);
}
diff --git a/src/modules/mixer/emixer.c b/src/modules/mixer/emixer.c
index 5cde88127..61728f758 100644
--- a/src/modules/mixer/emixer.c
+++ b/src/modules/mixer/emixer.c
@@ -55,7 +55,7 @@ _cb_sink_volume_drag_stop(void *data,
{
Evas_Object *bxv = data;
Emix_Sink *sink = evas_object_data_get(bxv, "sink");
- int vol = sink->volume.volumes[0];
+ int vol = sink->set_volume.volumes[0];
elm_slider_value_set(obj, vol);
}
diff --git a/src/modules/mixer/lib/emix.c b/src/modules/mixer/lib/emix.c
index 898df3a3b..058e4fb1a 100644
--- a/src/modules/mixer/lib/emix.c
+++ b/src/modules/mixer/lib/emix.c
@@ -280,6 +280,13 @@ emix_sink_volume_set(Emix_Sink *sink, Emix_Volume volume)
ctx->loaded->ebackend_sink_volume_set &&
sink));
+ sink->set_volume.channel_count = volume.channel_count;
+ sink->set_volume.volumes = calloc(volume.channel_count, sizeof(int));
+ for (unsigned int i = 0; i < volume.channel_count; i++)
+ {
+ sink->set_volume.volumes[i] = volume.volumes[i];
+ }
+
ctx->loaded->ebackend_sink_volume_set(sink, volume);
}
diff --git a/src/modules/mixer/lib/emix.h b/src/modules/mixer/lib/emix.h
index 29dc17da2..25b833ed8 100644
--- a/src/modules/mixer/lib/emix.h
+++ b/src/modules/mixer/lib/emix.h
@@ -55,6 +55,7 @@ typedef struct _Emix_Port {
typedef struct _Emix_Sink {
const char *name;
Emix_Volume volume;
+ Emix_Volume set_volume;
Eina_Bool mute;
Eina_List *ports;
} Emix_Sink;