PIP_getReaderAddr
Application Program Interface
2-275
Important Note:
This API is being deprecated and will no longer be
supported in the next major release of DSP/BIOS. We recommend that
you use the SIO module instead. The PIP module is still supported in
DSP/BIOS 5.32 and will be supported in any patch releases or minor
enhancements to DSP/BIOS 5.32.
C Interface
Syntax
readerAddr = PIP_getReaderAddr(pipe);
Parameters
PIP_Handle pipe;
/* pipe object handle */
Return Value
Ptr
readerAddr
Reentrant
yes
Description
PIP_getReaderAddr is a C function that returns the value of the
readerAddr pointer of a pipe object. The readerAddr pointer is normally
used following a call to PIP_get, as the address to begin reading from.
Example
Void audio(PIP_Obj *in, PIP_Obj *out)
{
Uns *src, *dst;
Uns size;
if (PIP_getReaderNumFrames(in) == 0 ||
PIP_getWriterNumFrames(out) == 0) {
error; }
PIP_get(in); /* get input data */
PIP_alloc(out); /* allocate output buffer */
/* copy input data to output buffer */
src = PIP_getReaderAddr(in);
dst = PIP_getWriterAddr(out);
size = PIP_getReaderSize(in);
PIP_setWriterSize(out,size);
for (; size > 0; size--) {
*dst++ = *src++;
}
/* output copied data and free input buffer */
PIP_put(out);
PIP_free(in);
}
PIP_getReaderAddr
Get the value of the readerAddr pointer of the pipe