Julius 4.2
データ構造 | マクロ定義 | 列挙型 | 関数
libsent/include/sent/adin.h

音声入力および振幅による音区間検出に関する定義 [詳細]

#include <sent/stddefs.h>
#include <sent/speech.h>

ソースコードを見る。

データ構造

struct  DS_FILTER
 down sampling filter [詳細]
struct  DS_BUFFER
 down sampling data [詳細]
struct  ZEROCROSS
 Work area for zero-cross computation. [詳細]

マクロ定義

#define DEFAULT_WSTEP   1000
 Default unit size of speech input segment in bytes.
#define SUPPORTED_WAVEFILE_FORMAT   "RAW(BE),WAV,AU,SND,NIST,ADPCM and more"
 String describing the list of supported wave file formats.
#define ZMEANSAMPLES   48000
 Number of samples from beggining of input to be used for computing the zero mean of source channel (for microphone/network input).
#define DS_RBSIZE   512
 Filter size.
#define DS_BUFSIZE   256
 Work area buffer size for x[].
#define DS_BUFSIZE_Y   512
 Work area buffer size for y[].
#define ZC_UNDEF   2
 Undefined mark for zerocross.
#define ZC_POSITIVE   1
 Positive mark used for zerocross.
#define ZC_NEGATIVE   -1
 Negative mark used for zerocross.

列挙型

enum  { INPUT_WAVEFORM, INPUT_VECTOR }
 Speech input type.
enum  {
  SP_RAWFILE, SP_MIC, SP_ADINNET, SP_MFCFILE,
  SP_NETAUDIO, SP_STDIN, SP_MFCMODULE
}
 Speech input source. [詳細]
enum  {
  SP_INPUT_DEFAULT, SP_INPUT_ALSA, SP_INPUT_OSS, SP_INPUT_ESD,
  SP_INPUT_PULSEAUDIO
}
 Input device.

関数

boolean adin_mic_standby (int freq, void *arg)
 Device initialization: check machine capability.
boolean adin_mic_begin (char *pathname)
 Start recording.
boolean adin_mic_end ()
 Stop recording.
int adin_mic_read (SP16 *buf, int sampnum)
 Read samples from device.
char * adin_mic_input_name ()
 Function to return current input source device name.
boolean adin_alsa_standby (int freq, void *arg)
 Device initialization: check machine capability.
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.
boolean adin_oss_standby (int freq, void *arg)
 Device initialization: check device capability and open for recording.
boolean adin_oss_begin (char *pathname)
 Start recording.
boolean adin_oss_end ()
 Stop recording.
int adin_oss_read (SP16 *buf, int sampnum)
 Read samples from device.
char * adin_oss_input_name ()
 Function to return current input source device name.
boolean adin_esd_standby (int freq, void *arg)
 Connection initialization: check connectivity and open for recording.
boolean adin_esd_begin (char *pathname)
 Start recording.
boolean adin_esd_end ()
 Stop recording.
int adin_esd_read (SP16 *buf, int sampnum)
 Read samples from the daemon.
char * adin_esd_input_name ()
 Function to return current input source device name.
boolean adin_pulseaudio_standby (int freq, void *arg)
 Connection initialization: check connectivity and open for recording.
boolean adin_pulseaudio_begin (char *pathname)
 Start recording.
boolean adin_pulseaudio_end ()
 Stop recording.
int adin_pulseaudio_read (SP16 *buf, int sampnum)
 Read samples from device.
char * adin_pulseaudio_input_name ()
 Function to return current input source device name.
boolean adin_netaudio_standby (int freq, void *arg)
 Connection initialization: check connectivity and open for recording.
boolean adin_netaudio_begin (char *pathname)
 Start recording.
boolean adin_netaudio_end ()
 Stop recording.
int adin_netaudio_read (SP16 *buf, int sampnum)
 Read samples from the daemon.
char * adin_netaudio_input_name ()
 Function to return current input source device name.
int NA_standby (int, char *)
 Initialize NetAudio device.
void NA_start ()
 Begin recording.
void NA_stop ()
 Pause the recording.
int NA_read (SP16 *buf, int sampnum)
 Read samples from NetAudio port.
boolean adin_file_standby (int freq, void *arg)
 Initialization: if listfile is specified, open it here.
boolean adin_file_begin (char *pathname)
 Begin reading audio data from a file.
int adin_file_read (SP16 *buf, int sampnum)
 Try to read sampnum samples and returns actual sample num recorded.
boolean adin_file_end ()
 End recording.
boolean adin_stdin_standby (int freq, void *arg)
 Initialization for speech input via stdin.
boolean adin_stdin_begin (char *pathname)
 Begin reading audio data from stdin.
int adin_stdin_read (SP16 *buf, int sampnum)
 Try to read sampnum samples and returns actual sample num recorded.
char * adin_file_get_current_filename ()
 A tiny function to get current input raw speech file name.
char * adin_stdin_input_name ()
 A tiny function to get current input raw speech file name.
boolean adin_sndfile_standby (int freq, void *arg)
 Initialization: if listfile is specified, open it here.
boolean adin_sndfile_begin (char *pathname)
 Begin reading audio data from a file.
int adin_sndfile_read (SP16 *buf, int sampnum)
 Try to read sampnum samples and returns actual sample num recorded.
boolean adin_sndfile_end ()
 End recording.
char * adin_sndfile_get_current_filename ()
 A tiny function to get current input raw speech file name.
boolean adin_tcpip_standby (int freq, void *arg)
 Initialize as adinnet server: prepare to become server.
boolean adin_tcpip_begin (char *pathname)
 Wait for connection from adinnet client and begin audio input stream.
boolean adin_tcpip_end ()
 End recording.
int adin_tcpip_read (SP16 *buf, int sampnum)
 Try to read sampnum samples and returns actual sample num recorded.
boolean adin_tcpip_send_pause ()
 Tell the adinnet client to pause transfer.
boolean adin_tcpip_send_terminate ()
 Tell the adinnet client to terminate transfer.
boolean adin_tcpip_send_resume ()
 Tell the adinnet client to resume the paused transfer.
char * adin_tcpip_input_name ()
 Function to return current input source device name.
void init_count_zc_e (ZEROCROSS *zc, int length)
 Allocate buffers for zerocross counting.
void reset_count_zc_e (ZEROCROSS *zc, int c_trigger, int c_length, int c_offset)
 Initialize all parameters and buffers for zero-cross counting.
void free_count_zc_e (ZEROCROSS *zc)
 End procedure: free all buffers.
int count_zc_e (ZEROCROSS *zc, SP16 *buf, int step)
 Adding buf[0..step-1] to the cycle buffer and update the count of zero cross.
void zc_copy_buffer (ZEROCROSS *zc, SP16 *newbuf, int *len)
 Flush samples in the current cycle buffer.
void zmean_reset ()
 Reset status.
void sub_zmean (SP16 *speech, int samplenum)
 Remove DC offset.
DS_BUFFERds48to16_new ()
 Setup for down sampling.
void ds48to16_free (DS_BUFFER *ds)
 Free the down sampling buffer.
int ds48to16 (SP16 *dst, SP16 *src, int srclen, int maxdstlen, DS_BUFFER *ds)
 Perform down sampling of input samples to 1/3.

説明

音声入力および振幅による音区間検出に関する定義

このファイルには, さまざまなソースからの音声入力処理と音声区間の検出 に関連するいくつかの定義が含まれています.

参照:
speech.h
作者:
Akinobu LEE
日付:
Thu Feb 10 17:22:36 2005
Revision:
1.10

adin.h で定義されています。


マクロ定義

#define SUPPORTED_WAVEFILE_FORMAT   "RAW(BE),WAV,AU,SND,NIST,ADPCM and more"

String describing the list of supported wave file formats.

It depends on HAVE_LIBSNDFILE.

adin.h72 行で定義されています。

参照元 j_output_argument_help().


列挙型

anonymous enum

Speech input source.

列挙型の値:
SP_RAWFILE 

Wavefile.

SP_MIC 

Live microphone device, or plugin.

SP_ADINNET 

Network client (adintool etc.)

SP_MFCFILE 

HTK parameter file.

SP_NETAUDIO 

Live NetAudio/DatLink input.

SP_STDIN 

Standard input.

SP_MFCMODULE 

parameter module

adin.h44 行で定義されています。


関数

boolean adin_mic_standby ( int  sfreq,
void *  dummy 
)

Device initialization: check machine capability.

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

Device initialization: check machine capability.

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

Device initialization: check machine capability.

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

adin_mic_darwin_coreaudio.c288 行で定義されています。

参照元 adin_select().

boolean adin_mic_begin ( char *  arg)

Start recording.

引数:
pathname[in] path name to open or NULL for default
戻り値:
TRUE on success, FALSE on failure.

adin_mic_darwin_coreaudio.c578 行で定義されています。

参照元 adin_select().

boolean adin_mic_end ( )

Stop recording.

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

adin_mic_darwin_coreaudio.c579 行で定義されています。

参照元 adin_select().

int adin_mic_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
戻り値:
actural number of read samples, -2 if error.

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 an error occured.

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
戻り値:
actural number of read samples, -2 if an error occured.

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

参照元 adin_select().

char* adin_mic_input_name ( )

Function to return current input source device name.

戻り値:
string of current input device name.

adin_mic_darwin_coreaudio.c675 行で定義されています。

参照元 adin_select().

boolean adin_alsa_standby ( int  sfreq,
void *  dummy 
)

Device initialization: check machine capability.

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

adin_mic_linux_alsa.c164 行で定義されています。

参照元 adin_mic_standby(), と adin_select().

boolean adin_alsa_begin ( char *  pathname)

Start recording.

引数:
pathname[in] device name to open or NULL for default
戻り値:
TRUE on success, FALSE on failure.

adin_mic_linux_alsa.c430 行で定義されています。

参照元 adin_mic_begin(), と adin_select().

boolean adin_alsa_end ( )

Stop recording.

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

adin_mic_linux_alsa.c499 行で定義されています。

参照元 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
戻り値:
actural number of read samples, -2 if an error occured.

adin_mic_linux_alsa.c523 行で定義されています。

参照元 adin_mic_read(), と adin_select().

char* adin_alsa_input_name ( )

Function to return current input source device name.

戻り値:
string of current input device name.

adin_mic_linux_alsa.c613 行で定義されています。

参照元 adin_mic_input_name(), と adin_select().

boolean adin_oss_standby ( int  sfreq,
void *  dummy 
)

Device initialization: check device capability and open for recording.

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

adin_mic_linux_oss.c118 行で定義されています。

参照元 adin_mic_standby(), と adin_select().

boolean adin_oss_begin ( char *  pathname)

Start recording.

引数:
pathname[in] path name to open or NULL for default
戻り値:
TRUE on success, FALSE on failure.

adin_mic_linux_oss.c358 行で定義されています。

参照元 adin_mic_begin(), と adin_select().

boolean adin_oss_end ( )

Stop recording.

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

adin_mic_linux_oss.c394 行で定義されています。

参照元 adin_mic_end(), と adin_select().

int adin_oss_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 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.

引数:
buf[out] samples obtained in this function
sampnum[in] wanted number of samples to be read
戻り値:
actural number of read samples, 0 of no sample has been captured in MAXPOLLINTERVAL msec, -2 if error.

adin_mic_linux_oss.c418 行で定義されています。

参照元 adin_mic_read(), と adin_select().

char* adin_oss_input_name ( )

Function to return current input source device name.

戻り値:
string of current input device name.

adin_mic_linux_oss.c485 行で定義されています。

参照元 adin_mic_input_name(), と adin_select().

boolean adin_esd_standby ( int  sfreq,
void *  dummy 
)

Connection initialization: check connectivity and open for recording.

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

adin_esd.c54 行で定義されています。

参照元 adin_mic_standby(), と adin_select().

boolean adin_esd_begin ( char *  pathname)

Start recording.

pathname is dummy.

引数:
pathname[in] path name to open or NULL for default
戻り値:
TRUE on success, FALSE on failure.

adin_esd.c86 行で定義されています。

参照元 adin_mic_begin(), と adin_select().

boolean adin_esd_end ( )

Stop recording.

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

adin_esd.c97 行で定義されています。

参照元 adin_mic_end(), と adin_select().

int adin_esd_read ( SP16 buf,
int  sampnum 
)

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 an error occured.

adin_esd.c115 行で定義されています。

参照元 adin_mic_read(), と adin_select().

char* adin_esd_input_name ( )

Function to return current input source device name.

戻り値:
string of current input device name.

adin_esd.c146 行で定義されています。

参照元 adin_mic_input_name(), と adin_select().

boolean adin_pulseaudio_standby ( int  sfreq,
void *  dummy 
)

Connection initialization: check connectivity and open for recording.

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

adin_pulseaudio.c54 行で定義されています。

参照元 adin_mic_standby(), と adin_select().

boolean adin_pulseaudio_begin ( char *  arg)

Start recording.

pathname is dummy.

引数:
arg[in] argument
戻り値:
TRUE on success, FALSE on failure.

adin_pulseaudio.c74 行で定義されています。

参照元 adin_mic_begin(), と adin_select().

boolean adin_pulseaudio_end ( )

Stop recording.

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

adin_pulseaudio.c101 行で定義されています。

参照元 adin_mic_end(), と adin_select().

int adin_pulseaudio_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 was obtained.

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

adin_pulseaudio.c128 行で定義されています。

参照元 adin_mic_read(), と adin_select().

char* adin_pulseaudio_input_name ( )

Function to return current input source device name.

戻り値:
string of current input device name.

adin_pulseaudio.c160 行で定義されています。

参照元 adin_mic_input_name(), と adin_select().

boolean adin_netaudio_standby ( int  sfreq,
void *  arg 
)

Connection initialization: check connectivity and open for recording.

引数:
sfreq[in] required sampling frequency
arg[in] server device name string to connect
戻り値:
TRUE on success, FALSE on failure.

adin_netaudio.c60 行で定義されています。

参照元 adin_select().

boolean adin_netaudio_begin ( char *  pathname)

Start recording.

引数:
pathname[in] path name to open or NULL for default
戻り値:
TRUE on success, FALSE on failure.

adin_netaudio.c75 行で定義されています。

参照元 adin_select().

boolean adin_netaudio_end ( )

Stop recording.

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

adin_netaudio.c87 行で定義されています。

参照元 adin_select().

int adin_netaudio_read ( SP16 buf,
int  sampnum 
)

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 an error occured.

adin_netaudio.c106 行で定義されています。

参照元 adin_select().

char* adin_netaudio_input_name ( )

Function to return current input source device name.

戻り値:
string of current input device name.

adin_netaudio.c125 行で定義されています。

参照元 adin_select().

int NA_standby ( int  sfreq,
char *  server_devname 
)

Initialize NetAudio device.

引数:
sfreq[in] sampling frequency
server_devname[in] server host name
戻り値:
1 on success, 0 on failure.

adin_na.c60 行で定義されています。

参照元 adin_netaudio_standby().

int NA_read ( SP16 buf,
int  sampnum 
)

Read samples from NetAudio port.

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
戻り値:
actural number of read samples, -1 if an error occured.

adin_na.c156 行で定義されています。

参照元 adin_netaudio_read().

boolean adin_file_standby ( int  freq,
void *  arg 
)

Initialization: if listfile is specified, open it here.

引数:
freq[in] required sampling frequency.
arg[in] file name of listfile, or NULL if not use
戻り値:
TRUE on success, FALSE on failure.

adin_file.c326 行で定義されています。

参照元 adin_select().

boolean adin_file_begin ( char *  filename)

Begin reading audio data from a file.

If listfile was specified in adin_file_standby(), the next filename will be read from the listfile. Otherwise, the filename will be obtained from stdin. Then the file will be opened here.

引数:
filename[in] file name to open or NULL for prompt
戻り値:
TRUE on success, FALSE on failure.

adin_file.c358 行で定義されています。

参照元 adin_select().

int adin_file_read ( SP16 buf,
int  sampnum 
)

Try to read sampnum samples and returns actual sample num recorded.

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

adin_file.c410 行で定義されています。

参照元 adin_select().

boolean adin_file_end ( )

End recording.

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

adin_file.c473 行で定義されています。

参照元 adin_select().

boolean adin_stdin_standby ( int  freq,
void *  arg 
)

Initialization for speech input via stdin.

引数:
freq[in] required sampling frequency.
argdummy, ignored
戻り値:
TRUE on success, FALSE on failure.

adin_file.c489 行で定義されています。

参照元 adin_select().

boolean adin_stdin_begin ( char *  pathname)

Begin reading audio data from stdin.

引数:
pathname[in] dummy
戻り値:
TRUE on success, FALSE on failure.

adin_file.c504 行で定義されています。

参照元 adin_select().

int adin_stdin_read ( SP16 buf,
int  sampnum 
)

Try to read sampnum samples and returns actual sample num recorded.

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

adin_file.c529 行で定義されています。

参照元 adin_select().

char* adin_file_get_current_filename ( )

A tiny function to get current input raw speech file name.

戻り値:
string of current input speech file.

adin_file.c585 行で定義されています。

参照元 adin_select().

char* adin_stdin_input_name ( )

A tiny function to get current input raw speech file name.

戻り値:
string of current input speech file.

adin_file.c597 行で定義されています。

参照元 adin_select().

boolean adin_sndfile_standby ( int  freq,
void *  arg 
)

Initialization: if listfile is specified, open it here.

Else, just store the required frequency.

引数:
freq[in] required sampling frequency
arg[in] file name of listfile, or NULL if not use
戻り値:
TRUE on success, FALSE on failure.

adin_sndfile.c202 行で定義されています。

参照元 adin_select().

boolean adin_sndfile_begin ( char *  filename)

Begin reading audio data from a file.

If listfile was specified in adin_sndfile_standby(), the next filename will be read from the listfile. Otherwise, the filename will be obtained from stdin. Then the file will be opened here.

引数:
filename[in] file name to open or NULL for prompt
戻り値:
TRUE on success, FALSE on failure.

adin_sndfile.c287 行で定義されています。

参照元 adin_select().

int adin_sndfile_read ( SP16 buf,
int  sampnum 
)

Try to read sampnum samples and returns actual sample num recorded.

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

adin_sndfile.c341 行で定義されています。

参照元 adin_select().

boolean adin_sndfile_end ( )

End recording.

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

adin_sndfile.c362 行で定義されています。

参照元 adin_select().

char* adin_sndfile_get_current_filename ( )

A tiny function to get current input raw speech file name.

戻り値:
string of current input speech file.

adin_sndfile.c381 行で定義されています。

参照元 adin_select().

boolean adin_tcpip_standby ( int  freq,
void *  port_str 
)

Initialize as adinnet server: prepare to become server.

引数:
freq[in] required sampling frequency
port_str[in] port number in string
戻り値:
TRUE on success, FALSE on failure.

adin_tcpip.c78 行で定義されています。

参照元 adin_select().

boolean adin_tcpip_begin ( char *  pathname)

Wait for connection from adinnet client and begin audio input stream.

引数:
pathname[in] path name to open or NULL for default
戻り値:
TRUE on success, FALSE on failure.

adin_tcpip.c102 行で定義されています。

参照元 adin_select().

boolean adin_tcpip_end ( )

End recording.

If last input segment was segmented by end of connection, close socket and wait for next connection. Otherwise, it means that the last input segment was segmented by either end-of-segment signal from client side or speech detection function in server side, so just wait for a next input in the current socket.

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

adin_tcpip.c151 行で定義されています。

参照元 adin_select().

int adin_tcpip_read ( SP16 buf,
int  sampnum 
)

Try to read sampnum samples and returns actual sample num recorded.

This function will not block.

If data of zero length has been received, it is treated as a end-of-segment marker from the client. If data below zero length has been received, it means the client has finished the overall input stream transmission and want to disconnect.

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

adin_tcpip.c182 行で定義されています。

参照元 adin_select().

boolean adin_tcpip_send_pause ( )

Tell the adinnet client to pause transfer.

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

adin_tcpip.c226 行で定義されています。

参照元 adin_select().

boolean adin_tcpip_send_terminate ( )

Tell the adinnet client to terminate transfer.

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

adin_tcpip.c292 行で定義されています。

参照元 adin_select().

boolean adin_tcpip_send_resume ( )

Tell the adinnet client to resume the paused transfer.

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

adin_tcpip.c244 行で定義されています。

参照元 adin_select().

char* adin_tcpip_input_name ( )

Function to return current input source device name.

戻り値:
string of current input device name.

adin_tcpip.c312 行で定義されています。

参照元 adin_select().

void init_count_zc_e ( ZEROCROSS zc,
int  length 
)

Allocate buffers for zerocross counting.

引数:
zc[i/o] zerocross work area
length[in] Cycle buffer size = Number of samples to hold

zc-e.c49 行で定義されています。

参照元 adin_setup_param(), と reset_count_zc_e().

void reset_count_zc_e ( ZEROCROSS zc,
int  c_trigger,
int  c_length,
int  c_offset 
)

Initialize all parameters and buffers for zero-cross counting.

引数:
zc[i/o] zerocross work area
c_trigger[in] Tgigger level threshold
c_length[in] Cycle buffer size = Number of samples to hold
c_offset[in] Static DC offset of input data

zc-e.c68 行で定義されています。

参照元 adin_cut().

void free_count_zc_e ( ZEROCROSS zc)

End procedure: free all buffers.

引数:
zc[i/o] zerocross work area

zc-e.c98 行で定義されています。

参照元 adin_free_param(), と reset_count_zc_e().

int count_zc_e ( ZEROCROSS zc,
SP16 buf,
int  step 
)

Adding buf[0..step-1] to the cycle buffer and update the count of zero cross.

Also swap them with the oldest ones in the cycle buffer. Also get the maximum level in the cycle buffer.

引数:
zc[i/o] zerocross work area
buf[I/O] new samples, will be swapped by old samples when returned.
step[in] length of above.
戻り値:
zero-cross count of the samples in the cycle buffer.

zc-e.c116 行で定義されています。

参照元 adin_cut().

void zc_copy_buffer ( ZEROCROSS zc,
SP16 newbuf,
int *  len 
)

Flush samples in the current cycle buffer.

引数:
zc[i/o] zerocross work area
newbuf[out] the samples in teh cycle buffer will be written here.
len[out] length of above.

zc-e.c165 行で定義されています。

参照元 adin_cut().

void sub_zmean ( SP16 speech,
int  samplenum 
)

Remove DC offset.

The DC offset is estimated by the first samples after zmean_reset() was called. If the first input segment is longer than ZMEANSAMPLES, the whole input is used to estimate the zero mean. Otherwise, the zero mean will continue to be updated until the read length exceed ZMEANSAMPLES.

引数:
speech[I/O] input speech data, will be subtracted by DC offset.
samplenum[in] length of above.

zmean.c70 行で定義されています。

参照元 adin_cut().

DS_BUFFER* ds48to16_new ( )

Setup for down sampling.

戻り値:
newly allocated buffer for down sampling

ds48to16.c269 行で定義されています。

参照元 adin_setup_all().

void ds48to16_free ( DS_BUFFER ds)

Free the down sampling buffer.

引数:
ds[i/o] down sampling buffer to free

ds48to16.c307 行で定義されています。

参照元 adin_free_param().

int ds48to16 ( SP16 dst,
SP16 src,
int  srclen,
int  maxdstlen,
DS_BUFFER ds 
)

Perform down sampling of input samples to 1/3.

引数:
dst[out] store the resulting samples
src[in] input samples
srclen[in] number of input samples
maxdstlen[in] maximum length of dst
ds[i/o] down sampling buffer
戻り値:
the number of samples written to dst, or -1 on errror.

ds48to16.c332 行で定義されています。

参照元 adin_cut().