Re: write(2) lc_r problem

From: Mathew Kanner <mat_at_cnd.mcgill.ca>
Date: Sat, 24 Jan 2004 15:03:43 -0500
On Jan 24, Stefan Ehmann wrote:
> On Sat, 2004-01-24 at 20:15, Mathew Kanner wrote:
> > On Jan 24, Stefan Ehmann wrote:
> > > I'm trying to write a small sound application and run across a problem
> > > on CURRENT.
> > > 
> > > It's very basic at the moment. It simply reads pcm data from a file and
> > > uses write(2) on /dev/dsp.
> > > 
> > > But as soon as I link the program with -lc_r there's always about 1
> > > second delay before a write call - which makes it pretty unusable for
> > > playing sound.
> > > 
> > > It should be easy reproducable if you link audio/waveplay with -lc_r.
> > > 
> > > This doesn't happen in either FreeBSD 4.9, Knoppix or CURRENT if linked
> > > with -lkse or -lthr.
> > > 
> > > Am I'm missing something basic when using write together with lc_r or
> > > ist this a bug in CURRENT?
> > 
> > 	There is definetly a bug with the sound code when using vchans
> > and select.  Make sure that  (using sysctl)
> > 
> > 	hw.snd.maxautovchans=0
> > 	hw.snd.pcmX.vchans=0
> 
> You're right, that fixed it. That's also the reason why it worked on
> stable (vchans was disabled there).

	Please try this untested patch with vchans enabled.

	--Mat


-- 
	We peer so suspiciously at each other that we cannot see
	that we Canadians are standing on the mountaintop of human
	wealth, freedom and privilege.
			- Pierre Elliott Trudeau

Received on Sat Jan 24 2004 - 11:09:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:39 UTC