Julius 4.2
|
マイク入力 (Linux/ALSA) [詳細]
#include <sent/stddefs.h>
#include <sent/adin.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
関数 | |
boolean | adin_alsa_standby (int sfreq, void *dummy) |
Device initialization: check machine capability. | |
static boolean | adin_alsa_open (char *devstr) |
Open the specified device and check capability of the opening device. | |
boolean | adin_alsa_begin (char *pathname) |
Start recording. | |
boolean | adin_alsa_end () |
Stop recording. | |
int | adin_alsa_read (SP16 *buf, int sampnum) |
Read samples from device. | |
char * | adin_alsa_input_name () |
Function to return current input source device name. |
マイク入力 (Linux/ALSA)
ALSA API を使用する,マイク入力のための低レベル関数です. 使用には ALSA サウンドドライバーがインストールされていることが必要です.
サウンドカードが 16bit モノラル で録音できることが必須です.
JuliusはLinuxではミキサーデバイスの設定を一切行いません.録音デバイスの 選択(マイク/ライン)や録音ボリュームの調節は alsamixer など他のツールで 行なって下さい.
複数サウンドカードはサポートされていません.複数のサウンドカードが インストールされている場合,最初の1つが用いられます.
バージョン 1.x に対応しています.1.0.13 で動作を確認しました.
デバイス名は "default" が使用されます.環境変数 ALSADEV で変更できます.
adin_mic_linux_alsa.c で定義されています。
boolean adin_alsa_standby | ( | int | sfreq, |
void * | dummy | ||
) |
Device initialization: check machine capability.
sfreq | [in] required sampling frequency. |
dummy | [in] a dummy data |
adin_mic_linux_alsa.c の 164 行で定義されています。
参照元 adin_mic_standby(), と adin_select().
static boolean adin_alsa_open | ( | char * | devstr | ) | [static] |
Open the specified device and check capability of the opening device.
devstr | [in] device string to open |
adin_mic_linux_alsa.c の 185 行で定義されています。
参照元 adin_alsa_begin().
boolean adin_alsa_begin | ( | char * | pathname | ) |
Start recording.
pathname | [in] device name to open or NULL for default |
adin_mic_linux_alsa.c の 430 行で定義されています。
参照元 adin_mic_begin(), と adin_select().
boolean adin_alsa_end | ( | ) |
Stop recording.
adin_mic_linux_alsa.c の 499 行で定義されています。
参照元 adin_mic_end(), と adin_select().
int adin_alsa_read | ( | SP16 * | buf, |
int | sampnum | ||
) |
Read samples from device.
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.
buf | [out] samples obtained in this function |
sampnum | [in] wanted number of samples to be read |
adin_mic_linux_alsa.c の 523 行で定義されています。
参照元 adin_mic_read(), と adin_select().
char* adin_alsa_input_name | ( | ) |
Function to return current input source device name.
adin_mic_linux_alsa.c の 613 行で定義されています。
参照元 adin_mic_input_name(), と adin_select().