home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.eng.gtefsd.com!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!sgiblab!munnari.oz.au!manuel.anu.edu.au!gorton.anu.edu.au!jaa101
- From: jaa101@gorton.anu.edu.au (James Ashton)
- Newsgroups: comp.sys.sun.hardware
- Subject: Re: Speakerbox on SS10 running OS 4.1.3
- Date: 28 Jan 1993 05:51:05 GMT
- Organization: The Australian National University, Canberra
- Lines: 45
- Distribution: world
- Message-ID: <1k7s89INNbhi@manuel.anu.edu.au>
- References: <1k11ulINNqq0@iraul1.ira.uka.de>
- NNTP-Posting-Host: 150.203.15.124
-
- In article <1k11ulINNqq0@iraul1.ira.uka.de>, fuchs@ira.uka.de (Stefan Fuchs) writes:
- > Hi!
- >
- > Has anybody out there managed to change the
- >
- > * sampling rate
- > * number of channels
- > * precision
- >
- > of the audio device on a SS10?
- >
- > Anytime that I try to assign a value (even the values AUDIO_GETINFO returns)
- > to one of these parameters I get an "Invalid Argument"-Message form the
- > AUDIO_SETINFO call.
-
- I have succeeded in altering other parameters although I haven't tried
- the ones you mention. I found that it was necessary to use the
- procedure documented in TFM:
-
- The audio_info structure may be initialized through the
- use of the AUDIO_INITINFO macro. This macro sets all
- fields in the structure to values that are ignored by
- the AUDIO_SETINFO command. For instance, the following
- code switches the output port from the built-in speaker
- to the headphone jack without modifying any other audio
- parameters:
-
- audio_info_t info;
-
- AUDIO_INITINFO(&info);
- info.play.port = AUDIO_HEADPHONE;
- err = ioctl(audio_fd, AUDIO_SETINFO, &info);
-
- This technique is preferred over using a sequence of
- AUDIO_GETINFO followed by AUDIO_SETINFO.
-
- I wondered about the exact meaning of `preferred' but after some trials
- and failures discovered that it more or less translates as `do it this
- way or it won't work'.
- ______________________________________________________________________________
- James Ashton System Administrator
- Department of Systems Engineering
- Voice +61 6 249 0681 Research School of Physical Sciences and Engineering
- FAX +61 6 249 2698 Australian National University
- Email James.Ashton@syseng.anu.edu.au GPO Box 4 Canberra ACT 2601 Australia
-