libsent/src/adin/adin_na.c File Reference

Sub routines for NetAudio input. More...

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

Go to the source code of this file.

Defines

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

Typedefs

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

Functions

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.

Variables

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


Detailed Description

Sub routines for NetAudio input.

This file defines sub functions for NetAudio input in adin_netaudio.c

These functions are separated from adin_netaudio.c because some definitions in NetAudio header "dat_types.h" conflicts with the include header "sent/stddefs.h".

Author:
Akinobu LEE
Date:
Sun Feb 13 19:40:56 2005
Revision
1.1.1.1

Definition in file adin_na.c.


Function Documentation

int NA_standby ( int  sfreq,
char *  server_devname 
)

Initialize NetAudio device.

Parameters:
sfreq [in] sampling frequency
server_devname [in] server host name
Returns:
1 on success, 0 on failure.

Definition at line 60 of file adin_na.c.

Referenced by adin_netaudio_standby().

static void NA_close (  )  [static]

Close port.

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

Definition at line 109 of file adin_na.c.

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.

Parameters:
buf [out] samples obtained in this function
sampnum [in] wanted number of samples to be read
Returns:
actural number of read samples, -1 if an error occured.

Definition at line 156 of file adin_na.c.

Referenced by adin_netaudio_read().


Generated on Tue Dec 18 16:01:37 2007 for Julius by  doxygen 1.5.4