[vlc-devel] [PATCH] aout: add rounding to playlist_VolumeUp
Alex Peak
alex at peaklester.com
Wed Mar 5 22:11:32 CET 2014
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?
>
> > if (volp != NULL)
> > *volp = vol;
> > ret = aout_VolumeSet (aout, vol);
>
> --
> Rémi Denis-Courmont
> Sent from my collocated server
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140305/8dacb656/attachment.html>
More information about the vlc-devel
mailing list