> [...]
> The current volume is the current volume not old. Pulse audio notify us
> when changing the volume and this field is updated at this time
> as you said.

The "current" volume of the sink is the last reported volume we got from
pulseaudio, and as we say in the video, there are cases where we are
having delays. So better NOT setting it when the drag ends, and just
synchronize the UI representation when we are setting the volume to
emix.

> 
> >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > But now, lets assume you are right. That means that we are
> > setting
> > > > > > EXACTLY
> > > > > > > > the same value we have just gotten from our slider, back to our
> > > > slider.
> > > > > > > > Why is that needed?
> > > > > > > >
> > > > > > >
> > > > > > > To be sure we display the correct value setted to pulse (BARRIER
> > > > feature
> > > > > > > could not change the volume or set it to a different value).
> > > > > > >
> > > > > > > If you want to see why we need this. Open emixer and move the
> > > > > > > enlightenment module slider in different value. You will see we
> > > > don't get
> > > > > > > the same value on both in some case.
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > And more important, not getting this commit into our code
> > > > just
> > > > > > hidde
> > > > > > > > us
> > > > > > > > > > the
> > > > > > > > > > > bug
> > > > > > > > > > > and give us no chance to spot it.
> > > > > > > > > >
> > > > > > > > > > Thats a part i dont understand :)
> > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > 2017-02-23 9:09 GMT+01:00 Marcel Hollerbach <
> > > > > > > > > > marcel-hollerb...@t-online.de>:
> > > > > > > > > > >
> > > > > > > > > > > > bu5hm4n pushed a commit to branch master.
> > > > > > > > > > > >
> > > > > > > > > > > > http://git.enlightenment.org/
> > > > core/enlightenment.git/commit/
> > > > > > ?id=
> > > > > > > > > > > > 9745890a37036091d5dec320fecda7ed4c6bdb6c
> > > > > > > > > > > >
> > > > > > > > > > > > commit 9745890a37036091d5dec320fecda7ed4c6bdb6c
> > > > > > > > > > > > Author: Marcel Hollerbach <
> > marcel-hollerb...@t-online.de>
> > > > > > > > > > > > Date:   Thu Feb 23 09:08:24 2017 +0100
> > > > > > > > > > > >
> > > > > > > > > > > >     Revert "Revert "mixer: do not set back the value
> > from
> > > > emix
> > > > > > > > once the
> > > > > > > > > > > > drag is finished""
> > > > > > > > > > > >
> > > > > > > > > > > >     This reverts commit fba185798cf75eaeaba4a95d2be25f
> > > > > > b2fea6ef1a.
> > > > > > > > > > > >
> > > > > > > > > > > >     There is not even a description why you reverted
> > it.
> > > > This
> > > > > > is a
> > > > > > > > > > bugfix
> > > > > > > > > > > >     that fixed a bug. So talk to me what the issue is,
> > but
> > > > > > please
> > > > > > > > stop
> > > > > > > > > > > >     reverting commits silently.
> > > > > > > > > > > > ---
> > > > > > > > > > > >  src/modules/mixer/e_mod_main.c | 11 -----------
> > > > > > > > > > > >  src/modules/mixer/emixer.c     | 13 -------------
> > > > > > > > > > > >  2 files changed, 24 deletions(-)
> > > > > > > > > > > >
> > > > > > > > > > > > diff --git a/src/modules/mixer/e_mod_main.c
> > > > > > > > b/src/modules/mixer/e_mod_
> > > > > > > > > > > > main.c
> > > > > > > > > > > > index ac805cc..2c86915 100644
> > > > > > > > > > > > --- a/src/modules/mixer/e_mod_main.c
> > > > > > > > > > > > +++ b/src/modules/mixer/e_mod_main.c
> > > > > > > > > > > > @@ -481,16 +481,6 @@ _slider_changed_cb(void *data
> > > > EINA_UNUSED,
> > > > > > > > > > > > Evas_Object *obj,
> > > > > > > > > > > >  }
> > > > > > > > > > > >
> > > > > > > > > > > >  static void
> > > > > > > > > > > > -_slider_drag_stop_cb(void *data EINA_UNUSED,
> > Evas_Object
> > > > *obj,
> > > > > > > > > > > > -                     void *event EINA_UNUSED)
> > > > > > > > > > > > -{
> > > > > > > > > > > > -   EINA_SAFETY_ON_NULL_RETURN(
> > > > mixer_context->sink_default);
> > > > > > > > > > > > -   Emix_Sink *s = (Emix_Sink
> > > > *)mixer_context->sink_default;
> > > > > > > > > > > > -   int val = s->volume.volumes[0];
> > > > > > > > > > > > -   elm_slider_value_set(obj, val);
> > > > > > > > > > > > -}
> > > > > > > > > > > > -
> > > > > > > > > > > > -static void
> > > > > > > > > > > >  _sink_selected_cb(void *data, Evas_Object *obj
> > > > EINA_UNUSED,
> > > > > > void
> > > > > > > > > > > > *event_info EINA_UNUSED)
> > > > > > > > > > > >  {
> > > > > > > > > > > >     Emix_Sink *s = data;
> > > > > > > > > > > > @@ -554,7 +544,6 @@ _popup_new(Instance *inst)
> > > > > > > > > > > >     evas_object_show(slider);
> > > > > > > > > > > >     elm_slider_min_max_set(slider, 0.0,
> > > > emix_max_volume_get());
> > > > > > > > > > > >     evas_object_smart_callback_add(slider, "changed",
> > > > > > > > > > _slider_changed_cb,
> > > > > > > > > > > > NULL);
> > > > > > > > > > > > -   evas_object_smart_callback_add(slider,
> > > > "slider,drag,stop",
> > > > > > > > > > > > _slider_drag_stop_cb, NULL);
> > > > > > > > > > > >     elm_slider_value_set(slider, volume);
> > > > > > > > > > > >     elm_box_pack_end(bx, slider);
> > > > > > > > > > > >     evas_object_show(slider);
> > > > > > > > > > > > diff --git a/src/modules/mixer/emixer.c
> > > > > > > > b/src/modules/mixer/emixer.c
> > > > > > > > > > > > index 5cde881..1bcd96c 100644
> > > > > > > > > > > > --- a/src/modules/mixer/emixer.c
> > > > > > > > > > > > +++ b/src/modules/mixer/emixer.c
> > > > > > > > > > > > @@ -49,17 +49,6 @@ _cb_sink_volume_change(void *data,
> > > > > > > > > > > >  }
> > > > > > > > > > > >
> > > > > > > > > > > >  static void
> > > > > > > > > > > > -_cb_sink_volume_drag_stop(void *data,
> > > > > > > > > > > > -                          Evas_Object *obj,
> > > > > > > > > > > > -                          void *event EINA_UNUSED)
> > > > > > > > > > > > -{
> > > > > > > > > > > > -   Evas_Object *bxv = data;
> > > > > > > > > > > > -   Emix_Sink *sink = evas_object_data_get(bxv,
> > "sink");
> > > > > > > > > > > > -   int vol = sink->volume.volumes[0];
> > > > > > > > > > > > -   elm_slider_value_set(obj, vol);
> > > > > > > > > > > > -}
> > > > > > > > > > > > -
> > > > > > > > > > > > -static void
> > > > > > > > > > > >  _cb_sink_mute_change(void *data,
> > > > > > > > > > > >                       Evas_Object *obj,
> > > > > > > > > > > >                       void *event_info EINA_UNUSED)
> > > > > > > > > > > > @@ -134,8 +123,6 @@ _emix_sink_add(Emix_Sink *sink)
> > > > > > > > > > > >     elm_box_pack_end(bx, sl);
> > > > > > > > > > > >     evas_object_show(sl);
> > > > > > > > > > > >     evas_object_smart_callback_add(sl, "changed",
> > > > > > > > > > _cb_sink_volume_change,
> > > > > > > > > > > > bxv);
> > > > > > > > > > > > -   evas_object_smart_callback_add(sl,
> > "slider,drag,stop",
> > > > > > > > > > > > -
> > > > _cb_sink_volume_drag_stop,
> > > > > > bxv);
> > > > > > > > > > > >
> > > > > > > > > > > >     ck = elm_check_add(win);
> > > > > > > > > > > >     evas_object_data_set(bxv, "mute", ck);
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Michaël Bouchaud (yoz) <y...@efl.so>
> > > > > > > > > > > ------------------------------
> > ------------------------------
> > > > > > > > > > ------------------
> > > > > > > > > > > Check out the vibrant tech community on one of the
> > world's
> > > > most
> > > > > > > > > > > engaging tech sites, SlashDot.org!
> > http://sdm.link/slashdot
> > > > > > > > > > > _______________________________________________
> > > > > > > > > > > enlightenment-devel mailing list
> > > > > > > > > > > enlightenment-devel@lists.sourceforge.net
> > > > > > > > > > > https://lists.sourceforge.net/
> > lists/listinfo/enlightenment-
> > > > devel
> > > > > > > > > >
> > > > > > > > > > ------------------------------
> > ------------------------------
> > > > > > > > > > ------------------
> > > > > > > > > > Check out the vibrant tech community on one of the world's
> > most
> > > > > > > > > > engaging tech sites, SlashDot.org!
> > http://sdm.link/slashdot
> > > > > > > > > > _______________________________________________
> > > > > > > > > > enlightenment-devel mailing list
> > > > > > > > > > enlightenment-devel@lists.sourceforge.net
> > > > > > > > > > https://lists.sourceforge.net/
> > lists/listinfo/enlightenment-
> > > > devel
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Michaël Bouchaud
> > > > > > > > > ------------------------------------------------------------
> > > > > > > > ------------------
> > > > > > > > > Check out the vibrant tech community on one of the world's
> > most
> > > > > > > > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > > > > > > > _______________________________________________
> > > > > > > > > enlightenment-devel mailing list
> > > > > > > > > enlightenment-devel@lists.sourceforge.net
> > > > > > > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-
> > devel
> > > > > > > >
> > > > > > > > ------------------------------------------------------------
> > > > > > > > ------------------
> > > > > > > > Check out the vibrant tech community on one of the world's most
> > > > > > > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > > > > > > _______________________________________________
> > > > > > > > enlightenment-devel mailing list
> > > > > > > > enlightenment-devel@lists.sourceforge.net
> > > > > > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-
> > devel
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Michaël Bouchaud
> > > > > > > ------------------------------------------------------------
> > > > > > ------------------
> > > > > > > Check out the vibrant tech community on one of the world's most
> > > > > > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > > > > > _______________________________________________
> > > > > > > enlightenment-devel mailing list
> > > > > > > enlightenment-devel@lists.sourceforge.net
> > > > > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > > > >
> > > > > > ------------------------------------------------------------
> > > > > > ------------------
> > > > > > Check out the vibrant tech community on one of the world's most
> > > > > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > > > > _______________________________________________
> > > > > > enlightenment-devel mailing list
> > > > > > enlightenment-devel@lists.sourceforge.net
> > > > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Michaël Bouchaud
> > > > > ------------------------------------------------------------
> > > > ------------------
> > > > > Check out the vibrant tech community on one of the world's most
> > > > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > > > _______________________________________________
> > > > > enlightenment-devel mailing list
> > > > > enlightenment-devel@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >
> > > > ------------------------------------------------------------
> > > > ------------------
> > > > Check out the vibrant tech community on one of the world's most
> > > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > > _______________________________________________
> > > > enlightenment-devel mailing list
> > > > enlightenment-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >
> > >
> > >
> > >
> > > --
> > > Michaël Bouchaud
> > > ------------------------------------------------------------
> > ------------------
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > > _______________________________________________
> > > enlightenment-devel mailing list
> > > enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> > ------------------------------------------------------------
> > ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> 
> 
> 
> -- 
> Michaël Bouchaud
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to