[Interface specifications]

Detailed Description

Audible tone emission / detection.

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

 Maximum number of frequencies to report.
 Maximum length of a BPSK bitstring to emit.
 Request/reply subtype: set configuration.
 Request/reply subtype: get configuration.
 Command subtype: play tone.
 Command subtype: play chirp.
 Command subtype: replay (last tone, last chirp ?).
 Data subtype: detected tones.
typedef player_audiodsp_data player_audiodsp_data_t
 Data: detected tones (PLAYER_AUDIODSP_DATA_TONES).
typedef player_audiodsp_cmd player_audiodsp_cmd_t
 Command: tone / chirp to play.
typedef player_audiodsp_config player_audiodsp_config_t
 Request/reply : Get/set audio properties.

Typedef Documentation

typedef struct player_audiodsp_cmd player_audiodsp_cmd_t

Command: tone / chirp to play.

The audiodsp interface accepts commands to produce fixed-frequency tones or binary phase shift keyed(BPSK) chirps through /dev/dsp (which is assumed to be associated with a sound card to which a speaker is attached). The command subtype, which should be PLAYER_AUDIODSP_PLAY_TONE, PLAYER_AUDIODSP_PLAY_CHIRP, or PLAYER_AUDIODSP_REPLAY, determines what to do.

typedef struct player_audiodsp_config player_audiodsp_config_t

Request/reply : Get/set audio properties.

Send a null PLAYER_AUDIODSP_GET_CONFIG request to receive the audiodsp configuration. Send a full PLAYER_AUDIODSP_SET_CONFIG request to modify the configuration (and receive a null response).

The sample format is defined in sys/soundcard.h, and defines the byte size and endian format for each sample.

The sample rate defines the Hertz at which to sample.

Mono or stereo sampling is defined in the channels parameter where 1==mono and 2==stereo.

typedef struct player_audiodsp_data player_audiodsp_data_t

Data: detected tones (PLAYER_AUDIODSP_DATA_TONES).

The audiodsp interface reads the audio stream from /dev/dsp (which is assumed to be associated with a sound card connected to a microphone) and performs some analysis on it. PLAYER_AUDIODSP_MAX_FREQS number of frequency/amplitude pairs are then returned as data.

Last updated 12 September 2005 21:38:45