[vlc-devel] [PATCH] aout: add rounding to playlist_VolumeUp

Jean-Baptiste Kempf jb at videolan.org
Wed Mar 5 22:15:22 CET 2014


On 05 Mar, Alex Peak wrote :
> On Wed, Mar 5, 2014 at 7:29 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> 
> >    Hello,
> >
> > On Tue,  4 Mar 2014 23:54:20 -0800, Alex Peak <bobcatawareness at gmail.com>
> > wrote:
> > > @@ -84,11 +88,12 @@ int playlist_VolumeUp (playlist_t *pl, int value,
> > > float *volp)
> > >          float vol = aout_VolumeGet (aout);
> > >          if (vol >= 0.)
> > >          {
> > > -            vol += delta / (float)AOUT_VOLUME_DEFAULT;
> > > +            vol += delta;
> > >              if (vol < 0.)
> > >                  vol = 0.;
> > >              if (vol > 2.)
> > >                  vol = 2.;
> > > +            vol = (round (vol / stepSize)) * stepSize;
> >
> > Do you really need double precision round() here?
> >
> 
> Nope, roundf should do fine.  That's what I get for thinking in Python...
> Should I resubmit the patch with the update as v2?

In general, yes. People need to resubmit with fixes...

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list