On Tue, Feb 11, 2020 at 07:15:00PM GMT, Alexandre Ratchov wrote:
> On Tue, Feb 11, 2020 at 07:01:28PM +0100, Florian Obser wrote:
> > I've been running the base diffs since you posted them. Firefox,
> > chrome and mpv still make noise :)
> >
> > I'm puzzled by this:
> >
> > $ cat /etc/mixerctl.conf
> >
> > outputs.master=255,255
> > record.enable=off
> >
> > $ mixerctl outputs.master
> >
> > outputs.master=255,255
> >
> > $ sndioctl
> > output.level=127
> >
> > I don't understand how they relate and why one goes to 255 and the
> > other to 127.
> > The error reporting is confusing, too:
> >
> > $ sndioctl output.level=128
> >
> > integer overflow
> >
> > But no regressions to report :)
> >
>
> Thanks, the code is base on MIDI bits, which uses the 0..127 range;
> sndiod, aucat and many codecs also use the 0..127 range. Anyway,
> replaced the error message by:
>
> $ sndioctl output.level=128
> 128: expected integer in the 0..127 range
>
> [...]
>
> I'm wondering if persents or floating points in the [0:1] range would
> be less confusing and solve most "units" problems.
>
Hi Alexandre,
I have to say that I also find the two ranges mildly confusing,
i.e. 0-255 in one place, and 0-127 in another. In terms of units,
personally, I'm used to, and quite like, the granularity of 0-255.
Again, not my place so others will certainly be more help here.
One more point regarding the interface, though.
This is the way mixerctl(1) currently behaves:
$ mixerctl outputs.master
outputs.master=255,255
$ mixerctl outputs.master=100
outputs.master: 255,255 -> 100,100
$ mixerctl outputs.master=300
outputs.master: 100,100 -> 255,255
Should sndioctl(1) behave the same way?
Cheers,
Raf