#include <sent/stddefs.h>
#include <sent/adin.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <poll.h>
#include <machine/soundcard.h>
Include dependency graph for adin_mic_freebsd.c:
Go to the source code of this file.
Defines | |
#define | DEFAULT_DEVICE "/dev/dsp" |
Default device name, can be overridden by AUDIODEV environment variable. | |
#define | FREQALLOWRANGE 200 |
Acceptable width of sampling frequency. | |
#define | POLLINTERVAL 200 |
Polling interval in miliseconds. | |
Functions | |
boolean | adin_mic_standby (int sfreq, void *arg) |
boolean | adin_mic_start () |
boolean | adin_mic_stop () |
int | adin_mic_read (SP16 *buf, int sampnum) |
Read samples from the daemon. | |
Variables | |
static int | audio_fd |
Audio descriptor. | |
static boolean | need_swap |
Whether input samples need byte-swapping. | |
pollfd | fds [1] |
Workarea for polling device. |
To use microphone input in FreeBSD, sound card and sound driver must support 16bit monaural recording.
Julius does not alter any mixer device setting at all. You should configure the mixer for recording source (mic/line) and recording volume correctly using other audio tool.
The default device name is "/dev/dsp", which can be changed by setting environment variable AUDIODEV.
Tested on FreeBSD 3.2-RELEASE with snd driver.
Definition in file adin_mic_freebsd.c.
|
Device initialization: check device capability and open for recording.
Definition at line 85 of file adin_mic_freebsd.c. |
|
Start recording.
Definition at line 191 of file adin_mic_freebsd.c. |
|
Stop recording.
Definition at line 207 of file adin_mic_freebsd.c. |
|
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 one sample can be obtained.
Definition at line 231 of file adin_mic_freebsd.c. |