Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sgi!wiltse@oceana.SGI.COM From: wiltse@oceana.SGI.COM (J. Wiltse Carpenter) Newsgroups: comp.sys.sgi Subject: Re: More Iris questions Summary: Audio on the Personal Iris Keywords: NeWS, PostScript, Bells, Sounds, Load Average, Mail Biff Message-ID: <27780@sgi.SGI.COM> Date: 2 Mar 89 18:12:46 GMT References: <4337@pt.cs.cmu.edu> Sender: daemon@sgi.SGI.COM Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 29 In article <4337@pt.cs.cmu.edu>, gleicher@b.gp.cs.cmu.edu (Michael Gleicher) writes: > Some more Iris questions: > > 2) Is there any documentation on the audio I/O capabilties of the Personal > Iris? I know it has a D/A converter, and I think it has an A/D > converter. > Does anyone have some code to send some data (a sampled sound or > waveform) to the speaker or to the audio out jack? > The only documentation available is the manual page, audio(7). But the audio channel is pretty simple so it hopefully won't be too hard to figure out how to use it. Here's a summary: The PI has an eight bit bi-directional A/D-D/A converter that supports three different sampling rates: 32Khz, 16khz, and 8khz. The output gain is software settable. A/D conversion is done by simply reading from /dev/audio and D/A conversion is done by writing to /dev/audio. Simple record and playback can be done with the ``dd'' command. To set the sampling rate or output gain requires that an ioctl() be performed on /dev/audio. In addition to the straight forward D/A conversion, there is a "loop mode" whereby a single buffer may be replayed for a preset time. To play a continuous sine wave for instance, one would construct a buffer containing one waveform and instruct /dev/audio to play it repeatedly for a certain length of time. The ioctl() AUDIOCDURATION (defined in /usr/include/sys/ audio.h), is used to specify the playback time in .01 second increments. -Wiltse