Netaudio - Townshend Computer Tools DAT-Link User Manual

Table of Contents

Advertisement

182
NAME
NAOpen, NAOpenData, NAClose, NACloseData, NAGetSnapShot, NAPause, NABegin, NADrain,
NAFlush,
NASetFilter,
N
APauseServer, NAResumeServer, NAWrite, NARead – library routines for client side NetAudio calls
DESCRIPTION
These routines allow C programs to access a NetAudio server on the local machine or other machines
connected via a network to playback and record audio signals. These routines create a connection to
t
he NetAudio server, netaudiod(8), and perform the required functions.
ROUTINES
#include <netaudio.h>
NAport ∗NAOpen(server
onst char ∗server;
c
Open a connection to the NetAudio server specified by the server string. This string should be
of the form host:unit, where host is the host on which the server is running and unit deter
m
ines which server on that host to connect to. If server is null, then the environment variable
A
UDIO_DEVICE
with unit 0.
T
he return value is an opaque pointer which is used for other calls to NetAudio routines. A
return value of NULL indicates there was an error in opening the connection.
i
nt NAOpenData(port,playrec)
NAport ∗port;
i
nt playrec;
Adds a data connection to a previously open NAport. The playrec arguments should be
or
N
A_PLAY
NA_RECORD
record (server to client) respectively.
connections--only one client may have a data connection open at any time. Attempts to open
c
onnection to a server that already has a data connection will result in a return value of -1 with
errno set to
EACCES. Otherwise, the return value is
descriptor will normally not be used by user programs)
i
nt NACloseData(port,force)
NAport ∗port;
i
nt force;
Close the data connection on the given port. If force is non-zero then pending data will be
immediately flushed. Otherwise, the data connection will be closed after all queued data i
t
ransferred to the DAT-Link as if NADrain() had been called first. In this case, the return
value will the same as described for NADrain().
i
nt NAClose(port)
NAport ∗port;
Close the connection to the given port. If a data connection is open, it is also closed and all
queued data is immediately flushed.
i
nt NAGetSnapshot(port,snap)
NAport ∗port;
Asnapshots ∗snap;
N
Get a NAsnapshots structure from the server. This structure contains the fast-changing status
within the server:
t
ypedef struct {
float VULevelLeft;
NetAudio Reference
NASerialRead,
NASerialWrite,
)
is queried for the server string. If that is also null, then the local host is used
to open the connection for playback (from client to server) o
The server provides exclusive access to data
/∗ Current VU levels ∗/
Last change: 1993/11/11

NETAUDIO(3)

NAGetServerVersion,
NAServer
connection to the server. (Though this fil
.
,
-
r
a
e
s
1

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?

Subscribe to Our Youtube Channel

Table of Contents