Julius 4.2
マクロ定義 | 型定義 | 関数 | 変数
libsent/src/adin/adin_na.c

NetAudio入力用のサブルーチン [詳細]

#include <sent/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <netaudio.h>
#include <defaults.h>

ソースコードを見る。

マクロ定義

#define TRUE   1
 Should be the same definition in stddefs.h.
#define FALSE   0
 Should be the same definition in stddefs.h.

型定義

typedef short SP16
 Should be the same definition in stddefs.h.

関数

int NA_standby (int sfreq, char *server_devname)
 Initialize NetAudio device.
static void NA_close ()
 Close port.
void NA_start ()
 Begin recording.
void NA_stop ()
 Pause the recording.
int NA_read (SP16 *buf, int sampnum)
 Read samples from NetAudio port.

変数

static NAport * port
 NetAudio port.
static int need_swap = FALSE
 Incoming data is always BIG ENDIAN.

説明

NetAudio入力用のサブルーチン

adin_netaudio.c 用のサブ関数が定義されています.

NetAudio のライブラリの dat_types.h が libsent/include/sent/stddefs.h での定義と一部衝突するため, このようにサブルーチン部分を分離しています.

作者:
Akinobu LEE
日付:
Sun Feb 13 19:40:56 2005
Revision:
1.3

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


関数

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().

static void NA_close ( ) [static]

Close port.

(actually never used, just for reference...)

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

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().