home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sun / hardware / 7153 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.3 KB

  1. 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
  2. From: jaa101@gorton.anu.edu.au (James Ashton)
  3. Newsgroups: comp.sys.sun.hardware
  4. Subject: Re: Speakerbox on SS10 running OS 4.1.3
  5. Date: 28 Jan 1993 05:51:05 GMT
  6. Organization: The Australian National University, Canberra
  7. Lines: 45
  8. Distribution: world
  9. Message-ID: <1k7s89INNbhi@manuel.anu.edu.au>
  10. References: <1k11ulINNqq0@iraul1.ira.uka.de>
  11. NNTP-Posting-Host: 150.203.15.124
  12.  
  13. In article <1k11ulINNqq0@iraul1.ira.uka.de>, fuchs@ira.uka.de (Stefan Fuchs) writes:
  14. > Hi!
  15. > Has anybody out there managed to change the 
  16. > * sampling rate
  17. > * number of channels
  18. > * precision
  19. > of the audio device on a SS10?
  20. > Anytime that I try to assign a value (even the values AUDIO_GETINFO returns)
  21. > to one of these parameters I get an "Invalid Argument"-Message form the
  22. > AUDIO_SETINFO call.
  23.  
  24. I have succeeded in altering other parameters although I haven't tried
  25. the ones you mention.  I found that it was necessary to use the
  26. procedure documented in TFM:
  27.  
  28.           The audio_info structure may be initialized through the
  29.           use  of  the AUDIO_INITINFO macro.  This macro sets all
  30.           fields in the structure to values that are  ignored  by
  31.           the AUDIO_SETINFO command.  For instance, the following
  32.           code switches the output port from the built-in speaker
  33.           to the headphone jack without modifying any other audio
  34.           parameters:
  35.  
  36.                audio_info_t   info;
  37.  
  38.                AUDIO_INITINFO(&info);
  39.                info.play.port = AUDIO_HEADPHONE;
  40.                err = ioctl(audio_fd, AUDIO_SETINFO, &info);
  41.  
  42.           This technique is preferred over using  a  sequence  of
  43.           AUDIO_GETINFO followed by AUDIO_SETINFO.
  44.  
  45. I wondered about the exact meaning of `preferred' but after some trials
  46. and failures discovered that it more or less translates as `do it this
  47. way or it won't work'.
  48. ______________________________________________________________________________
  49. James Ashton                          System Administrator
  50.                          Department of Systems Engineering
  51. Voice +61 6 249 0681      Research School of Physical Sciences and Engineering
  52. FAX   +61 6 249 2698                Australian National University
  53. Email James.Ashton@syseng.anu.edu.au     GPO Box 4 Canberra ACT 2601 Australia
  54.