summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƫl Bouchaud (yoz) <yoz@efl.so>2016-10-31 14:36:13 +0100
committerMichael Bouchaud <michael.bouchaud@ext.actia.fr>2017-02-22 22:59:13 +0100
commitdbdf411b488fd4d3f37a26d8cb142b25aba784d6 (patch)
tree199ce4914f50d4ba47a9c131f5022a4d21874df7
parentf13d9dc8cd5bf65bcb1b19313e247dddd67838c4 (diff)
mixer: use VOLSET macro in volume output set
-rw-r--r--src/modules/mixer/e_mod_main.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 18a8a5fd2..42fc20b4a 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -470,27 +470,14 @@ _slider_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
470 void *event EINA_UNUSED) 470 void *event EINA_UNUSED)
471{ 471{
472 int val; 472 int val;
473 Emix_Volume v;
474 unsigned int i;
475 int pval;
476 473
477 EINA_SAFETY_ON_NULL_RETURN(mixer_context->sink_default); 474 EINA_SAFETY_ON_NULL_RETURN(mixer_context->sink_default);
478 Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default; 475 Emix_Sink *s = (Emix_Sink *)mixer_context->sink_default;
479 476
480 pval = s->volume.volumes[0];
481
482 val = (int)elm_slider_value_get(obj); 477 val = (int)elm_slider_value_get(obj);
483 v.volumes = calloc(s->volume.channel_count, sizeof(int)); 478 VOLSET(val, s->volume, s, emix_sink_volume_set);
484 v.channel_count = s->volume.channel_count;
485 if (BARRIER_CHECK(pval, val))
486 val = 100;
487
488 for (i = 0; i < s->volume.channel_count; i++) v.volumes[i] = val;
489 emix_sink_volume_set(s, v);
490 elm_slider_value_set(obj, val);
491 emix_config_save_state_get(); 479 emix_config_save_state_get();
492 if (emix_config_save_get()) e_config_save_queue(); 480 if (emix_config_save_get()) e_config_save_queue();
493 free(v.volumes);
494} 481}
495 482
496static void 483static void