next up previous contents
Next: 6.5 audiodsp Up: 6. Device Interfaces Previous: 6.3 aio   Contents

Subsections


6.4 audio

Synopsis

The audio interface is used to control sound hardware, if equipped.

Data



struct player_audio_data : The audio interface reads the audio stream from /dev/audio (which is assumed to be associated with a sound card connected to a microphone) and performs some analysis on it. Five frequency/amplitude pairs are then returned as data; the format is:

uint16_t frequency0, amplitude0;
Hz, db ?

uint16_t frequency1, amplitude1;
Hz, db ?

uint16_t frequency2, amplitude2;
Hz, db ?

uint16_t frequency3, amplitude3;
Hz, db ?

uint16_t frequency4, amplitude4;
Hz, db ?

Command



struct player_audio_cmd : The audio interface accepts commands to produce fixed-frequency tones through /dev/dsp (which is assumed to be associated with a sound card to which a speaker is attached); the format is:

uint16_t frequency;
Frequency to play (Hz?)

uint16_t amplitude;
Amplitude to play (dB?)

uint16_t duration;
Duration to play (sec?)


next up previous contents
Next: 6.5 audiodsp Up: 6. Device Interfaces Previous: 6.3 aio   Contents
2004-06-02