Date: Sat, 21 Jun 1997 02:18:37 -0700 From: John-Mark Gurney <jmg@hydrogen.nike.efn.org> To: Mark Murray <mark@grondar.za> Cc: multimedia@FreeBSD.ORG Subject: Re: GUS PnP woes Message-ID: <19970621021837.50564@hydrogen.nike.efn.org> In-Reply-To: <199706210833.KAA08887@greenpeace.grondar.za>; from Mark Murray on Sat, Jun 21, 1997 at 10:33:51AM %2B0200 References: <199706210833.KAA08887@greenpeace.grondar.za>
next in thread | previous in thread | raw e-mail | index | archive | help
Mark Murray scribbled this message on Jun 21:
> Amancio Hasty wrote:
> > That looks more like a bug with speak_freely than with the
> > sound driver. Please make sure that speak_freely does indeed
> > attempt to open /dev/audio or /dev/dsp with RW .
> >
> > If it tries to open /dev/audio0 for playback and /dev/audio1 for reading
> > the sound driver will fail. This mode of full duplex audio was used
> > in pre Sound Driver 3.5 drivers.
>
> Hmmm...
>
> Two processes can't open /dev/audio. How should this work?
see below, they can if one is a child of another...
> Speak_freely has one process doing the reading and one doing the
> writing. The one that starts second cannot get /dev/audio because it is
> busy. This can be duplicated by going 'cat /dev/audio > /dev/audio'.
so you simply do something like:
int fd;
fd=open("/dev/audio", O_RDWR);
if(fork()) {
handle one end;
} else {
handle the other;
}
really quite simple... and the seperate audio{0,1} was probably so you
could simulate full duplex audio with two sound cards... one as audio0
and the other as audio1...
--
John-Mark Gurney Modem/FAX: +1 541 683 6954
Cu Networking
Live in Peace, destroy Micro$oft, support free software, run FreeBSD
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970621021837.50564>
