Townshend Computer Tools DAT-Link User Manual page 187

Table of Contents

Advertisement

NETAUDIO(3)
float VULevelRight;
u
nsigned int sampleNumber;
unsigned int buffered; /∗ Number of samples of buffered data ∗/
}
NAsnapshot;
typedef struct
{
NAsnapshot pb;
NAsnapshot rec;
}
NAsnapshots;
Snapshots can also be generated as part of NA_SNAPSHOT events. See na_event(3) for
details.
i
nt NAPause(port,playrec,pause)
NAport ∗port;
i
nt playrec;
int pause;
Pause or resume transfers. playrec should be NA_PLAY or NA_RECORD to pause playback
or recording respectively. The pause argument is non-zero to pause transfers, zero to resum
t
hem.
int NABegin(port,playrec)
NAport ∗port;
i
nt playrec;
Force transfers to/from the digital audio IO's to begin. This routine must be called before
using NARead() to retrieve samples during recording. For playback, it's use its optional sinc
t
ransfers to the digital audio outputs will begin automatically once the DAT-Link's internal
buffers are full. Also, NADrain() and NACloseData() automatically initiate playback if it has
n
ot already begun. Note that due to a limitation of the SCSI driver's on most computer, the
last 512 bytes of data may not be sent to the DAT-Link until NADrain() or NACloseData() i
c
alled. Thus, if only a small amount of data is being sent, NABegin() should NOT be called or
the DAT-Link may underrun before the last 512 bytes can be sent.
i
nt NADrain(port)
NAport ∗port;
Force playback to begin if it has not already and then allow buffered samples to drain during
playback. This routine will not return until all buffered data has been output to the digita
a
udio outputs. If all is well, NADrain() will return 0, if a server communication error occurs
-1 will be returned, and, if a transfer error such as an underrun occurred, the transfer error code
(
see na_info(3) ) will be returned.
int NAFlush(port,playrec)
Aport ∗port;
N
int playrec;
Flush (delete) any buffered data for transfers in the given direction.
int NASetFilter(port,filter)
Aport ∗port;
N
const NAfilter ∗filter
;
Setup the specifications for filtering during conversion of audio data by the DAT-Link. This
structure of the filter argument is:
t
ypedef struct {
float atten;
N
etAudio Reference
/∗ Current sample number at input or output ∗/
/∗ Playback snapshot ∗/
/∗ Record snapshot ∗/
Last change: 1993/11/11
183
e
e
s
l
2

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DAT-Link and is the answer not in the manual?

Table of Contents