#include <sent/stddefs.h>
#include <sent/adin.h>
#include <sent/tcpip.h>
関数 | |
boolean | adin_tcpip_standby (int freq, void *port_str) |
Initialize as adinnet server: prepare to become server. | |
boolean | adin_tcpip_begin () |
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_resume () |
Tell the adinnet client to resume the paused transfer. | |
boolean | adin_tcpip_send_terminate () |
Tell the adinnet client to terminate transfer. | |
変数 | |
static int | adinnet_sd = -1 |
Listen socket for adinserv | |
static int | adinnet_asd = -1 |
Accept socket for adinserv | |
static boolean | last_is_segmented = FALSE |
FALSE if last segment was an end of connection |
入力ソースとして Julius の adinnet クライアントを使用する低レベル関数です.
adinnet は ネットワーク上で音声データを送信する Julius 独自の方式です. この入力が選ばれた場合,Julius はadinnetサーバとなり,起動時に クライアントの接続を待ちます.サンプルのadinnetクライアントとして, adintool が Julius に付属していますので参考にしてください.
Linux, Windows, その他サポートされているほとんどの OS で動作します.
他にネットワーク上で音声データをやりとりする方法として, Linux では EsounD を使う方法があります.adin_esd.c をご覧ください.
adin_tcpip.c で定義されています。
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 |
adin_tcpip.c の 79 行で定義されています。
参照元 adin_select().
boolean adin_tcpip_begin | ( | ) |
Wait for connection from adinnet client and begin audio input stream.
adin_tcpip.c の 103 行で定義されています。
参照元 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.
adin_tcpip.c の 156 行で定義されています。
参照元 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 |
adin_tcpip.c の 188 行で定義されています。
参照元 adin_select().
boolean adin_tcpip_send_pause | ( | ) |
Tell the adinnet client to pause transfer.
adin_tcpip.c の 234 行で定義されています。
参照元 j_request_pause().
boolean adin_tcpip_send_resume | ( | ) |
Tell the adinnet client to resume the paused transfer.
adin_tcpip.c の 252 行で定義されています。
参照元 j_request_resume().
boolean adin_tcpip_send_terminate | ( | ) |
Tell the adinnet client to terminate transfer.
adin_tcpip.c の 270 行で定義されています。