gleicher@b.gp.cs.cmu.edu (Michael Gleicher) (02/23/89)
Some more Iris questions: 1) Is there a way to ring the bell from postscript? 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? 3) Is there an equivalent to the BSD "Load average"? Can I get at this number from a C program? 4) The "gr_osview" program displays statistics like %cpu idle, %memory free, %time waiting. Is there a way I can get at these numbers from a C program so I can display them in a more convenient fashion? 5) Does anyone have some postscript code for a Mail Biff program? right now I just have the Vax (my mail machine) do something silly like "x y (You Have Mail) popmsg\n" (it's not pretty but it works) Before I go re-inventing the wheel, does anyone already have something to do this nicer (eg draw an xbiff like mailbox with a flag on it) (Yes I know I can run xbiff, but I prefer not to have to start up an xsevrer all the time) Thanks for the help, Mike Michael Lee Gleicher gleicher@cs.cmu.edu Computer Graphics & Animation, School of Computer Science Carnegie Mellon University, Pittsburgh, PA 15213-3890 -- Michael Lee Gleicher gleicher@cs.cmu.edu Computer Graphics & Animation, School of Computer Science Carnegie Mellon University, Pittsburgh, PA 15213-3890 --
jmb@patton.SGI.COM (Jim Barton) (02/25/89)
In article <4337@pt.cs.cmu.edu>, gleicher@b.gp.cs.cmu.edu (Michael Gleicher) writes: ... (questions I can't answer skipped ...) ... > 4) The "gr_osview" program displays statistics like %cpu idle, %memory free, > %time waiting. Is there a way I can get at these numbers from a > C program so I can display them in a more convenient fashion? > "gr_osview" uses the standard System V structure sysinfo, which is "documented" in the header file /usr/include/sys/sysinfo.h. The structure can be conviently read using the sysmp(2) call, which has a man page, and uses the /usr/include/sys/sysmp.h header file. This avoids having to read the UNIX namelist and read from /dev/kmem, like standard SysV does. There are other interesting hooks in sysmp(2), some of which gr_osview uses. ... > -- > Michael Lee Gleicher gleicher@cs.cmu.edu > Computer Graphics & Animation, School of Computer Science > Carnegie Mellon University, Pittsburgh, PA 15213-3890 > -- -- Jim Barton Silicon Graphics Computer Systems "UNIX: Live Free Or Die!" jmb@sgi.sgi.com, sgi!jmb@decwrl.dec.com, ...{decwrl,sun}!sgi!jmb "I used to be disgusted, now I'm just amused." - Elvis Costello, 'Red Shoes' --
wiltse@oceana.SGI.COM (J. Wiltse Carpenter) (03/03/89)
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