libsent/src/adin/adin_mic_freebsd.c

マイク入力 (FreeBSD) [詳細]

#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>
adin_mic_freebsd.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 POLLINTERVAL   200
 Polling interval in miliseconds.

関数

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 device.

変数

static int audio_fd
 Audio descriptor.
static boolean need_swap
 Whether input samples need byte-swapping.
struct pollfd fds [1]
 Workarea for polling device.

説明

マイク入力 (FreeBSD)

作者:
Akinobu LEE
日付:
Sun Feb 13 16:18:26 2005

マイク入力のための低レベル関数です.FreeBSDでこのファイルが使用されます.

サウンドカードが 16bit モノラル で録音できることが必須です.

JuliusはFreeBSDでミキサーデバイスの設定を一切行いません.録音デバイスの 選択(マイク/ライン)や録音ボリュームの調節は他のツールで 行なって下さい.

デフォルトのデバイス名は "/dev/dsp" です.環境変数 AUDIODEV に デバイス名を指定することで,他のデバイス名を使用できます.

動作確認はFreeBSD 3.2-RELEASE で行なわれました.サウンドドライバは snd を使用しています.

Revision
1.3

adin_mic_freebsd.c で定義されています。


関数

boolean adin_mic_standby ( int  sfreq,
void *  arg 
)

Device initialization: check device capability and open for recording.

引数:
sfreq [in] required sampling frequency.
arg [in] a dummy data
戻り値:
TRUE on success, FALSE on failure.

adin_mic_freebsd.c85 行で定義されています。

boolean adin_mic_start (  ) 

Start recording.

戻り値:
TRUE on success, FALSE on failure.

adin_mic_freebsd.c191 行で定義されています。

boolean adin_mic_stop (  ) 

Stop recording.

戻り値:
TRUE on success, FALSE on failure.

adin_mic_freebsd.c207 行で定義されています。

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 one sample can be obtained.

引数:
buf [out] samples obtained in this function
sampnum [in] wanted number of samples to be read
戻り値:
actural number of read samples, -2 if error.

adin_mic_freebsd.c231 行で定義されています。


Juliusに対してTue Sep 22 00:14:57 2009に生成されました。  doxygen 1.6.0