Specifications

More about Host Channels and Pipes
7-12
Calls to PIP_getReaderNumFrames and PIP_getWriterNumFrames
then determine whether there is at least one frame in the input pipe
that is ready to be read and one frame in the output pipe that can be
written to.
Using the same RTDX calls used in section 7.2, page 7-3, the
function gets the volume setting from the RTDX control channel.
The call to PIP_get gets a full frame from the input pipe. The call to
PIP_getReaderAddr gets a pointer to the beginning of the data in the
input pipe frame and PIP_getReaderSize gets the number of words
in the input pipe frame.
The call to PIP_alloc gets an empty frame from the output pipe. The
call to PIP_getWriterAddr gets a pointer to the location to begin
writing data to in the output pipe frame.
The function then multiplies the input signal by the volume and writes
the results to the frame using the pointer provided by
PIP_getWriterAddr.
The call to PIP_put puts the full frame into the output pipe. The call
to PIP_free recycles the input frame so that it can be reused the next
time this function runs.
â– 
Added an error function, which writes an error message to the trace
log and then puts the program in an infinite loop. This function runs if
A2DscaleD2A runs when there are no frames of data available for
processing.
7.6 More about Host Channels and Pipes
Each host channel uses a pipe internally. When you are using a host channel,
your target program manages one end of the pipe and the Host Channel
Control plug-in manages the other end of the pipe.
When you are ready to modify your program to use peripheral devices other
than the host PC, you can retain the code that manages the target’s end of
the pipe and add code in functions that handle device I/O to manage the other
end of the pipe.