From owner-freebsd-multimedia Sat Jun 21 02:18:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA20377 for multimedia-outgoing; Sat, 21 Jun 1997 02:18:11 -0700 (PDT) Received: from hydrogen.nike.efn.org (resnet.uoregon.edu [128.223.170.28]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA20372 for ; Sat, 21 Jun 1997 02:18:06 -0700 (PDT) Received: (from jmg@localhost) by hydrogen.nike.efn.org (8.8.5/8.8.5) id CAA04547; Sat, 21 Jun 1997 02:18:37 -0700 (PDT) Message-ID: <19970621021837.50564@hydrogen.nike.efn.org> Date: Sat, 21 Jun 1997 02:18:37 -0700 From: John-Mark Gurney To: Mark Murray Cc: multimedia@FreeBSD.ORG Subject: Re: GUS PnP woes References: <199706210833.KAA08887@greenpeace.grondar.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: <199706210833.KAA08887@greenpeace.grondar.za>; from Mark Murray on Sat, Jun 21, 1997 at 10:33:51AM +0200 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 2.2.1-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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