#include <sent/stddefs.h>
#include <sent/adin.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/stropts.h>
#include <sys/audioio.h>
Go to the source code of this file.
Defines | |
#define | DEFAULT_DEVICE "/dev/audio" |
Default device name, can be overridden by AUDIODEV environment variable. | |
Functions | |
boolean | adin_mic_standby (int sfreq, void *arg) |
Device initialization: check device capability and open for recording. | |
boolean | adin_mic_begin () |
Start recording. | |
boolean | adin_mic_end () |
Stop recording. | |
int | adin_mic_read (SP16 *buf, int sampnum) |
Read samples from device. | |
Variables | |
static int | afd |
Audio file descriptor. | |
static struct audio_info | ainfo |
Audio format information. |
Low level I/O functions for microphone input on Solaris 2.x machines. This file is used as default on Solaris 2.x machines.
Tested on Sun Solaris 2.5.1 and 2.6. Also works on later versions. Please note that this will not work on Solaris x86, since machine byte order is fixed to big endian.
The microphone input device will be automatically selected by Julius on startup. Please note that the recoding volue will not be altered by Julius, and appropriate value should be set by another tool such as gaintool.
The default device name is "/dev/audio", which can be changed by setting environment variable AUDIODEV.
Definition in file adin_mic_sol2.c.
boolean adin_mic_standby | ( | int | sfreq, | |
void * | arg | |||
) |
Device initialization: check device capability and open for recording.
Connection initialization: check connectivity and open for recording.
sfreq | [in] required sampling frequency. | |
arg | [in] a dummy data |
Definition at line 77 of file adin_mic_sol2.c.
boolean adin_mic_begin | ( | ) |
Start recording.
Definition at line 152 of file adin_mic_sol2.c.
boolean adin_mic_end | ( | ) |
Stop recording.
Definition at line 173 of file adin_mic_sol2.c.
int adin_mic_read | ( | SP16 * | buf, | |
int | sampnum | |||
) |
Read samples from device.
Read samples from the daemon.
Try to read sampnum samples and returns actual number of recorded samples currently available. This function will block until at least some samples are obtained.
buf | [out] samples obtained in this function | |
sampnum | [in] wanted number of samples to be read |
Definition at line 200 of file adin_mic_sol2.c.