#include <sent/stddefs.h>
#include <sent/adin.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <fcntl.h>
#include <sys/soundcard.h>
adin_mic_linux_oss.cのインクルード依存関係図
マクロ定義 | |
#define | DEFAULT_DEVICE "/dev/dsp" |
Default device name, can be overridden by AUDIODEV environment variable. | |
#define | FREQALLOWRANGE 200 |
Acceptable width of sampling frequency. | |
#define | MAXPOLLINTERVAL 300 |
Read timeout in msec. | |
#define | FRAGMENT_POWER 10 |
関数 | |
boolean | adin_mic_standby (int sfreq, void *dummy) |
boolean | adin_mic_start () |
boolean | adin_mic_stop () |
int | adin_mic_read (SP16 *buf, int sampnum) |
Read samples from the daemon. | |
変数 | |
static int | audio_fd |
Audio descriptor. | |
static boolean | need_swap |
Whether samples need byte swap. | |
static int | frag_size |
Actual data fragment size. | |
static boolean | stereo_rec |
TRUE if stereo recording (use left only). |
configure でマイクタイプの自動判別を 行なう場合(デフォルト),Linux ではこのOSS用インタフェースが選択されます. 他のインタフェース (ALSA, esd, portaudio, spAudio等) を使用したい場合は configure 時に "--with-mictype=TYPE" を明示的に指定して下さい.
サウンドカードが 16bit モノラル で録音できることが必須です. ただしLinuxでは,ステレオ録音しかできないデバイスの場合, 左チャンネルのみを入力として取り出して認識することもできます.
JuliusはLinuxではミキサーデバイスの設定を一切行いません.録音デバイスの 選択(マイク/ライン)や録音ボリュームの調節は xmixer など他のツールで 行なって下さい.
デフォルトのデバイス名は "/dev/dsp" です.環境変数 AUDIODEV に デバイス名を指定することで,他のデバイス名を使用できます.
adin_mic_linux_oss.c で定義されています。
|
Data fragment size. Input will be delayed by 2^X bytes. The default value of 10 means we treat input per a unit of 2~10=1024 bytes, which corresponds to 32 msec in 16kHz sampling. adin_mic_linux_oss.c の 86 行で定義されています。 参照元 adin_mic_standby(). |
|
Device initialization: check device capability and open for recording.
adin_mic_linux_oss.c の 102 行で定義されています。 |
|
Start recording.
adin_mic_linux_oss.c の 298 行で定義されています。 |
|
Stop recording.
adin_mic_linux_oss.c の 318 行で定義されています。 |
|
Read samples from the daemon. Try to read sampnum samples and returns actual number of recorded samples currently available. This function will block at most MAXPOLLINTERVAL msec, until at least one sample can be obtained. If no data has been obtained after waiting for MAXPOLLINTERVAL msec, returns 0. When stereo input, only left channel will be used.
adin_mic_linux_oss.c の 347 行で定義されています。 |