Return to BSD News archive
Newsgroups: comp.os.386bsd.bugs Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!news.sprintlink.net!hookup!olivea!quack!quack.kfu.com!nsayer From: nsayer@quack.kfu.com (Nick Sayer) Subject: Problem with /dev/audio ioctls? Message-ID: <gpuzivO@quack.kfu.com> Sender: news@quack.kfu.com (0000-News(0000)) Organization: The Duck Pond public unix: +1 408 249 9630, log in as 'guest'. Date: 17 Nov 1994 17:13:15 UTC Lines: 44 This is with FreeBSD 1.1.5.1. I've been playing with /dev/audio. Catting .au files to it works ok, but I want to expand on that a bit. The first thing I've tried doing is ioctl AUDIO_GETINFO, but in fact, _any_ AUDIO_ ioctl I try on /dev/audio returns ENXIO. Here's sample source: #include <sys/ioctl.h> #include <stdio.h> #include <machine/pcaudioio.h> #define DEV "/dev/audio" main() { FILE *f; audio_info_t info; if ((f=fopen(DEV,"w+"))==NULL) { perror("open"); exit(0); } if(ioctl(fileno(f),AUDIO_GETINFO,&info)<0) { perror("ioctl(AUDIO_GETINFO)"); exit(0); } /* ... */ } Indeed, this program quits printing "ioctl(AUDIO_GETINFO): Input/output error"), or ENXIO. Is it just me? -- Nick Sayer <nsayer@quack.kfu.com> | N6QQQ @ N0ARY.#NOCAL.CA.USA.NOAM | Like the majority of Americans, +1 408 249 9630, log in as 'guest' | I did not vote for Bill Clinton. URL: http://www.kfu.com/~nsayer/ |