aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-23 16:00:16 (GMT)
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-24 17:03:01 (GMT)
commit04308ab8aaa3e38450d746d524a769e9a823d571 (patch)
tree5bc9d0a3592b710dfb0b4f9d2f467207bdca0d25
parentmixer: set the value we set to emix not the value from the backend (diff)
downloadenlightenment-devs/bu5hm4n/mixer-fix.tar.gz
-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 e00bfd9..209435e 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 5cde881..61728f7 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 898df3a..058e4fb 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 29dc17d..25b833e 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;