More Iris questions

J. Wiltse Carpenter wiltse at oceana.SGI.COM
Fri Mar 3 04:12:46 AEST 1989


In article <4337 at pt.cs.cmu.edu>, gleicher at 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



More information about the Comp.sys.sgi mailing list