--- - branch: MAIN date: Sun Apr 19 11:27:40 UTC 2020 files: - new: '1.42' old: '1.41' path: src/lib/libossaudio/ossaudio.c pathrev: src/lib/libossaudio/ossaudio.c@1.42 type: modified id: 20200419T112740Z.3af15d5932486ddd6e1a10794cb7c74483a7f306 log: | ossaudio: Make SNDCTL_DSP_[GET|SET][PLAY|RECORD]VOL closer to OSSv4 Problems in the previous code include returning values in the 0-255 range NetBSD uses instead of the 0-100 range OSSv4 expects, using AUDIO_GETBUFINFO (which doesn't even return the mixer bits), and not encoding channels as specified: "level=(left)|(right << 8)". In reality, setting the gain in this way (through /dev/audio rather than /dev/mixer) doesn't seem to work properly, and the mixer-set value seems to be retained. However, these changes at least ensure that the return values are correct and the balance is set correctly. I've only found one application using this API (audio/audacious), and OSSv4 support in it is currently disabled precisely because it breaks when it attempts to set the track volume using it. module: src subject: 'CVS commit: src/lib/libossaudio' unixtime: '1587295660' user: nia