Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2001 13:06:30 -0500 (EST)
From:      Pete Weisz <pete@pw34.resnet.cornell.edu>
To:        multimedia@FreeBSD.ORG
Subject:   Re: Full duplex /dev/dsp won't open for read
Message-ID:  <Pine.BSF.4.21.0102231254150.17543-100000@pw34.resnet.cornell.edu>
In-Reply-To: <007101c09d50$fdf63710$0504020a@haveblue>

next in thread | previous in thread | raw e-mail | index | archive | help
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?


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?Pine.BSF.4.21.0102231254150.17543-100000>