News for hackers. Stuff that matters.
Re:The worst volume control UI in the world (2017) by nyanpasu64 on Tuesday July 13, 2021 @10:53PM (#27829082)
How would you compute the current volume level? You would have to either store the current x value (which could desync if you change the volume level using the OS volume control), or derive the nearest x from the current y value (which may be possible on PulseAudio, but I haven't checked if you're stuck to the nearest 1% or if you can get a more precise or dB level).
Re:The worst volume control UI in the world (2017) by javajosh on Wednesday July 14, 2021 @01:22AM (#27829980)
Well if the function you put in is continuous, single-valued , then you can invert it and compute x(y). At the end of the day if the volume is represented as a syscall with a float between 0 and 1 you can play arbitrary games with any bijective function to make setting that number arbitrarily complicated.