summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-23 17:00:16 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-24 18:03:01 +0100
commit04308ab8aaa3e38450d746d524a769e9a823d571 (patch)
tree5bc9d0a3592b710dfb0b4f9d2f467207bdca0d25
parent4304036e51bbb105c0a839171bac3329ef3a218c (diff)
-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,
487{ 487{
488 EINA_SAFETY_ON_NULL_RETURN(mixer_context->sink_default); 488 EINA_SAFETY_ON_NULL_RETURN(mixer_context->sink_default);
489 Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default; 489 Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default;
490 int val = s->volume.volumes[0]; 490 int val = s->set_volume.volumes[0];
491 elm_slider_value_set(obj, val); 491 elm_slider_value_set(obj, val);
492} 492}
493 493
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,
55{ 55{
56 Evas_Object *bxv = data; 56 Evas_Object *bxv = data;
57 Emix_Sink *sink = evas_object_data_get(bxv, "sink"); 57 Emix_Sink *sink = evas_object_data_get(bxv, "sink");
58 int vol = sink->volume.volumes[0]; 58 int vol = sink->set_volume.volumes[0];
59 elm_slider_value_set(obj, vol); 59 elm_slider_value_set(obj, vol);
60} 60}
61 61
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)
280 ctx->loaded->ebackend_sink_volume_set && 280 ctx->loaded->ebackend_sink_volume_set &&
281 sink)); 281 sink));
282 282
283 sink->set_volume.channel_count = volume.channel_count;
284 sink->set_volume.volumes = calloc(volume.channel_count, sizeof(int));
285 for (unsigned int i = 0; i < volume.channel_count; i++)
286 {
287 sink->set_volume.volumes[i] = volume.volumes[i];
288 }
289
283 ctx->loaded->ebackend_sink_volume_set(sink, volume); 290 ctx->loaded->ebackend_sink_volume_set(sink, volume);
284} 291}
285 292
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 {
55typedef struct _Emix_Sink { 55typedef struct _Emix_Sink {
56 const char *name; 56 const char *name;
57 Emix_Volume volume; 57 Emix_Volume volume;
58 Emix_Volume set_volume;
58 Eina_Bool mute; 59 Eina_Bool mute;
59 Eina_List *ports; 60 Eina_List *ports;
60} Emix_Sink; 61} Emix_Sink;