Subject: kern/14819: changing ym /dev/audio encoding is unreliable
To: None <>
From: None <>
List: netbsd-bugs
Date: 12/02/2001 23:17:13
>Number:         14819
>Category:       kern
>Synopsis:       changing ym /dev/audio encoding is unreliable
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 02 23:15:00 PST 2001
>Release:        NetBSD 1.5.2
System: NetBSD glen 1.5.2 NetBSD 1.5.2 (GLEN) #0: Fri Nov 23 10:42:08 PST 2001 root@glen:/usr/src/sys/arch/i386/compile/GLEN i386

	I am using an OPL3-SA3 card with the ym driver.  When I open /dev/audio
	and set the encoding/precision/rate, sometimes the settings don't
	actually take effect.  The ioctl does not return an error, and
	audioctl reports the settings that ought to be in place.  But the
	audio sounds terrible.

	If I use "audioctl -w play=$(audioctl play|cut -d = -f 2)" in the
	middle of incorrect playback, the audio starts playing correctly.

	I discovered this problem when all my SDL applications stopped
	working when I switched from my SoundBlaster to my OPL3-SA3 card.

	Code to demonstrate the problem:

	on my machine, using ym-test.c:
	example 1 sometimes plays a sine wave, sometimes plays hideous static
	example 2 always plays hideous static
	examples 3 and 4 always play a sine wave

	A workaround is to configure software to use /dev/sound
	instead of /dev/audio