4 ms·
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
by nyanpasu64 5y ago
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).
- javajosh 5y agoWell 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.