Module Name: src Committed By: nia Date: Wed Apr 15 14:54:34 UTC 2020
Modified Files: src/lib/libossaudio: ossaudio.c src/sys/compat/ossaudio: ossaudio.c Log Message: ossaudio: Make SNDCTL_DSP_SPEED more robust when using invalid rates. >From the perspective of reading the OSSv4 specification, NetBSD's behaviour when an invalid sample rate is set makes no sense at all: AUDIO_SETINFO simply returns an error code, and then we immediately fall through to getting the sample rate, which is still set to the legacy default of 8000 Hz. Instead, what OSS applications generally expect is that they will be able to receive the actual hardware sample rate. This is very, very unlikely to be 8000 Hz on a modern machine. No functional change when setting a sample rate between the supported rates of 1000 and 192000 Hz. When a rate outside this range is requested, the hardware rate is returned (on modern hardware, generally always 48000 Hz or a multiple of 48000 Hz). To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/lib/libossaudio/ossaudio.c cvs rdiff -u -r1.78 -r1.79 src/sys/compat/ossaudio/ossaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.