Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2001 15:13:04 -0500
From:      "Andresen,Jason R." <jandrese@mitre.org>
To:        Pete Weisz <pete@pw34.resnet.cornell.edu>
Cc:        multimedia@FreeBSD.ORG
Subject:   Re: Full duplex /dev/dsp won't open for read
Message-ID:  <3A96C450.D1229A37@mitre.org>
References:  <Pine.BSF.4.21.0102231254150.17543-100000@pw34.resnet.cornell.edu>

next in thread | previous in thread | raw e-mail | index | archive | help


Pete Weisz wrote:
> 
> On Fri, 23 Feb 2001, Cameron Grant wrote:
> 
> > > What i'm getting stuck at is that /dev/dsp won't open for
> > > both reading for some reason
> >
> > show us the relevant bit of your code.
> >
> >     -cg
> >
> - - - - - - - >8 - - - - - - -
> #include <stdio.h>
> #include <fcntl.h>
> #include <unistd.h>
> #include <sys/soundcard.h>
> 
> #define DSP_DEV "/dev/dspW0"
> 
> int main(int argc, char* argv[]) {
>    snd_chan_param chan;
>    int caps, fd;
> 
>    if((fd=open(DSP_DEV, O_RDWR, 0)) == -1);
>       fprintf(stderr, "Couldn't open audio device\n");
> 
> - - - - - - >8 - - - - - - -
> 
> actually, it won't open for RD_ONLY either... It has permissions,
> etc, works for write... Is it necessary to turn something on before
> you open it for reading?

Does recording work at all on your card?  Try: cat /dev/dsp > foo.wav 
and see if it fails.  If that fails you might try upgrading FreeBSD, 
some of the newer drivers work better than the older ones.

If it worked once, but doesn't work anymore try checking to see if 
something is sitting on the audio device (perhaps a wedged recording
application?)

-- 
   _  _    _  ___  ____  ___   ______________________________________
  / \/ \  | ||_ _||  _ \|___| | Jason Andresen -- jandrese@mitre.org
 / /\/\ \ | | | | | |/ /|_|_  | Views expressed may not reflect those 
/_/    \_\|_| |_| |_|\_\|___| | of the Mitre Corporation.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A96C450.D1229A37>