Module Name: src Committed By: nia Date: Sun Apr 19 11:27:40 UTC 2020
Modified Files: src/lib/libossaudio: ossaudio.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/lib/libossaudio/ossaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.