pa_process.c File Reference

Buffer Processor implementation. More...

#include <assert.h>
#include <string.h>
#include "pa_process.h"
#include "pa_util.h"

Defines

#define PA_FRAMES_PER_TEMP_BUFFER_WHEN_HOST_BUFFER_SIZE_IS_UNKNOWN_   1024
#define PA_MIN_(a, b)   ( ((a)<(b)) ? (a) : (b) )
#define PA_MAX_(a, b)   (((a) > (b)) ? (a) : (b))

Functions

PaError PaUtil_InitializeBufferProcessor (PaUtilBufferProcessor *bp, int inputChannelCount, PaSampleFormat userInputSampleFormat, PaSampleFormat hostInputSampleFormat, int outputChannelCount, PaSampleFormat userOutputSampleFormat, PaSampleFormat hostOutputSampleFormat, double sampleRate, PaStreamFlags streamFlags, unsigned long framesPerUserBuffer, unsigned long framesPerHostBuffer, PaUtilHostBufferSizeMode hostBufferSizeMode, PaStreamCallback *streamCallback, void *userData)
void PaUtil_TerminateBufferProcessor (PaUtilBufferProcessor *bp)
void PaUtil_ResetBufferProcessor (PaUtilBufferProcessor *bp)
unsigned long PaUtil_GetBufferProcessorInputLatency (PaUtilBufferProcessor *bp)
unsigned long PaUtil_GetBufferProcessorOutputLatency (PaUtilBufferProcessor *bp)
void PaUtil_SetInputFrameCount (PaUtilBufferProcessor *bp, unsigned long frameCount)
void PaUtil_SetNoInput (PaUtilBufferProcessor *bp)
void PaUtil_SetInputChannel (PaUtilBufferProcessor *bp, unsigned int channel, void *data, unsigned int stride)
void PaUtil_SetInterleavedInputChannels (PaUtilBufferProcessor *bp, unsigned int firstChannel, void *data, unsigned int channelCount)
void PaUtil_SetNonInterleavedInputChannel (PaUtilBufferProcessor *bp, unsigned int channel, void *data)
void PaUtil_Set2ndInputFrameCount (PaUtilBufferProcessor *bp, unsigned long frameCount)
void PaUtil_Set2ndInputChannel (PaUtilBufferProcessor *bp, unsigned int channel, void *data, unsigned int stride)
void PaUtil_Set2ndInterleavedInputChannels (PaUtilBufferProcessor *bp, unsigned int firstChannel, void *data, unsigned int channelCount)
void PaUtil_Set2ndNonInterleavedInputChannel (PaUtilBufferProcessor *bp, unsigned int channel, void *data)
void PaUtil_SetOutputFrameCount (PaUtilBufferProcessor *bp, unsigned long frameCount)
void PaUtil_SetNoOutput (PaUtilBufferProcessor *bp)
void PaUtil_SetOutputChannel (PaUtilBufferProcessor *bp, unsigned int channel, void *data, unsigned int stride)
void PaUtil_SetInterleavedOutputChannels (PaUtilBufferProcessor *bp, unsigned int firstChannel, void *data, unsigned int channelCount)
void PaUtil_SetNonInterleavedOutputChannel (PaUtilBufferProcessor *bp, unsigned int channel, void *data)
void PaUtil_Set2ndOutputFrameCount (PaUtilBufferProcessor *bp, unsigned long frameCount)
void PaUtil_Set2ndOutputChannel (PaUtilBufferProcessor *bp, unsigned int channel, void *data, unsigned int stride)
void PaUtil_Set2ndInterleavedOutputChannels (PaUtilBufferProcessor *bp, unsigned int firstChannel, void *data, unsigned int channelCount)
void PaUtil_Set2ndNonInterleavedOutputChannel (PaUtilBufferProcessor *bp, unsigned int channel, void *data)
void PaUtil_BeginBufferProcessing (PaUtilBufferProcessor *bp, PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags callbackStatusFlags)
unsigned long PaUtil_EndBufferProcessing (PaUtilBufferProcessor *bp, int *streamCallbackResult)
int PaUtil_IsBufferProcessorOutputEmpty (PaUtilBufferProcessor *bp)
unsigned long PaUtil_CopyInput (PaUtilBufferProcessor *bp, void **buffer, unsigned long frameCount)
unsigned long PaUtil_CopyOutput (PaUtilBufferProcessor *bp, const void **buffer, unsigned long frameCount)
unsigned long PaUtil_ZeroOutput (PaUtilBufferProcessor *bp, unsigned long frameCount)

Detailed Description

Buffer Processor implementation.

The code in this file is not optimised yet - although it's not clear that it needs to be. there may appear to be redundancies that could be factored into common functions, but the redundanceis are left intentionally as each appearance may have different optimisation possibilities.

The optimisations which are planned involve only converting data in-place where possible, rather than copying to the temp buffer(s).

Note that in the extreme case of being able to convert in-place, and there being no conversion necessary there should be some code which short-circuits the operation.

Todo:
Consider cache tilings for intereave<->deinterleave.
Todo:
implement timeInfo->currentTime int PaUtil_BeginBufferProcessing()
Todo:
specify and implement some kind of logical policy for handling the underflow and overflow stream flags when the underflow/overflow overlaps multiple user buffers/callbacks.
Todo:
provide support for priming the buffers with data from the callback. The client interface is now implemented through PaUtil_SetNoInput() which sets bp->hostInputChannels[0][0].data to zero. However this is currently only implemented in NonAdaptingProcess(). It shouldn't be needed for AdaptingInputOnlyProcess() (no priming should ever be requested for AdaptingInputOnlyProcess()). Not sure if additional work should be required to make it work with AdaptingOutputOnlyProcess, but it definitely is required for AdaptingProcess.
Todo:
implement PaUtil_SetNoOutput for AdaptingProcess
Todo:
don't allocate temp buffers for blocking streams unless they are needed. At the moment they are needed, but perhaps for host APIs where the implementation passes a buffer to the host they could be used.

Define Documentation

#define PA_FRAMES_PER_TEMP_BUFFER_WHEN_HOST_BUFFER_SIZE_IS_UNKNOWN_   1024
#define PA_MAX_ ( a,
 )     (((a) > (b)) ? (a) : (b))
#define PA_MIN_ ( a,
 )     ( ((a)<(b)) ? (a) : (b) )

Function Documentation

void PaUtil_BeginBufferProcessing ( PaUtilBufferProcessor bufferProcessor,
PaStreamCallbackTimeInfo timeInfo,
PaStreamCallbackFlags  callbackStatusFlags 
)

Commence processing a host buffer (or a pair of host buffers in the full-duplex case) for a callback stream.

Parameters:
bufferProcessor The buffer processor.
timeInfo Timing information for the first sample of the host buffer(s). This information may be adjusted when buffer adaption is being performed.
callbackStatusFlags Flags indicating whether underruns and overruns have occurred since the last time the buffer processor was called.

FIXME:

Todo:
time info currentTime not implemented

References PaUtilBufferProcessor::callbackStatusFlags, PaStreamCallbackTimeInfo::currentTime, PaUtilBufferProcessor::framesInTempInputBuffer, PaUtilBufferProcessor::framesInTempOutputBuffer, PaUtilBufferProcessor::hostInputFrameCount, PaUtilBufferProcessor::hostOutputFrameCount, PaStreamCallbackTimeInfo::inputBufferAdcTime, PaStreamCallbackTimeInfo::outputBufferDacTime, PaUtilBufferProcessor::samplePeriod, and PaUtilBufferProcessor::timeInfo.

unsigned long PaUtil_CopyInput ( PaUtilBufferProcessor bufferProcessor,
void **  buffer,
unsigned long  frameCount 
)

Copy samples from host input channels set up by the PaUtil_Set*InputChannels functions to a user supplied buffer. This function is intended for use with blocking read/write streams. Copies the minimum of the number of user frames (specified by the frameCount parameter) and the number of available host frames (specified in a previous call to SetInputFrameCount()).

Parameters:
bufferProcessor The buffer processor.
buffer A pointer to the user buffer pointer, or a pointer to a pointer to an array of user buffer pointers for a non-interleaved stream. It is important that this parameter points to a copy of the user buffer pointers, not to the actual user buffer pointers, because this function updates the pointers before returning.
frameCount The number of frames of data in the buffer(s) pointed to by the buffer parameter.
Returns:
The number of frames copied. The buffer pointer(s) pointed to by the buffer parameter are advanced to point to the frame(s) following the last one filled.

References PaUtilBufferProcessor::bytesPerHostInputSample, PaUtilBufferProcessor::bytesPerUserInputSample, PaUtilChannelDescriptor::data, PaUtilBufferProcessor::ditherGenerator, PaUtilBufferProcessor::hostInputChannels, PaUtilBufferProcessor::hostInputFrameCount, PaUtilBufferProcessor::inputChannelCount, PaUtilBufferProcessor::inputConverter, PA_MIN_, PaUtilChannelDescriptor::stride, and PaUtilBufferProcessor::userInputIsInterleaved.

unsigned long PaUtil_CopyOutput ( PaUtilBufferProcessor bp,
const void **  buffer,
unsigned long  frameCount 
)
unsigned long PaUtil_EndBufferProcessing ( PaUtilBufferProcessor bufferProcessor,
int *  callbackResult 
)

Finish processing a host buffer (or a pair of host buffers in the full-duplex case) for a callback stream.

Parameters:
bufferProcessor The buffer processor.
callbackResult On input, indicates a previous callback result, and on exit, the result of the user stream callback, if it is called. On entry callbackResult should contain one of { paContinue, paComplete, or paAbort}. If paComplete is passed, the stream callback will not be called but any audio that was generated by previous stream callbacks will be copied to the output buffer(s). You can check whether the buffer processor's internal buffer is empty by calling PaUtil_IsBufferProcessorOutputEmpty.

If the stream callback is called its result is stored in *callbackResult. If the stream callback returns paComplete or paAbort, all output buffers will be full of valid data - some of which may be zeros to acount for data that wasn't generated by the terminating callback.

Returns:
The number of frames processed. This usually corresponds to the number of frames specified by the PaUtil_Set*FrameCount functions, exept in the paUtilVariableHostBufferSizePartialUsageAllowed buffer size mode when a smaller value may be returned.

References PaUtilChannelDescriptor::data, PaUtilBufferProcessor::hostBufferSizeMode, PaUtilBufferProcessor::hostInputChannels, PaUtilBufferProcessor::hostInputFrameCount, PaUtilBufferProcessor::hostOutputChannels, PaUtilBufferProcessor::hostOutputFrameCount, PaUtilBufferProcessor::inputChannelCount, PaUtilBufferProcessor::outputChannelCount, PA_MIN_, paAbort, paComplete, paContinue, paUtilVariableHostBufferSizePartialUsageAllowed, and PaUtilBufferProcessor::useNonAdaptingProcess.

unsigned long PaUtil_GetBufferProcessorInputLatency ( PaUtilBufferProcessor bufferProcessor  ) 

Retrieve the input latency of a buffer processor.

Parameters:
bufferProcessor The buffer processor examine.
Returns:
The input latency introduced by the buffer processor, in frames.
See also:
PaUtil_GetBufferProcessorOutputLatency

References PaUtilBufferProcessor::initialFramesInTempInputBuffer.

unsigned long PaUtil_GetBufferProcessorOutputLatency ( PaUtilBufferProcessor bufferProcessor  ) 

Retrieve the output latency of a buffer processor.

Parameters:
bufferProcessor The buffer processor examine.
Returns:
The output latency introduced by the buffer processor, in frames.
See also:
PaUtil_GetBufferProcessorInputLatency

References PaUtilBufferProcessor::initialFramesInTempOutputBuffer.

PaError PaUtil_InitializeBufferProcessor ( PaUtilBufferProcessor bufferProcessor,
int  inputChannelCount,
PaSampleFormat  userInputSampleFormat,
PaSampleFormat  hostInputSampleFormat,
int  outputChannelCount,
PaSampleFormat  userOutputSampleFormat,
PaSampleFormat  hostOutputSampleFormat,
double  sampleRate,
PaStreamFlags  streamFlags,
unsigned long  framesPerUserBuffer,
unsigned long  framesPerHostBuffer,
PaUtilHostBufferSizeMode  hostBufferSizeMode,
PaStreamCallback streamCallback,
void *  userData 
)

Initialize a buffer processor's representation stored in a PaUtilBufferProcessor structure. Be sure to call PaUtil_TerminateBufferProcessor after finishing with a buffer processor.

Parameters:
bufferProcessor The buffer processor structure to initialize.
inputChannelCount The number of input channels as passed to Pa_OpenStream or 0 for an output-only stream.
userInputSampleFormat Format of user input samples, as passed to Pa_OpenStream. This parameter is ignored for ouput-only streams.
hostInputSampleFormat Format of host input samples. This parameter is ignored for output-only streams. See note about host buffer interleave below.
outputChannelCount The number of output channels as passed to Pa_OpenStream or 0 for an input-only stream.
userOutputSampleFormat Format of user output samples, as passed to Pa_OpenStream. This parameter is ignored for input-only streams.
hostOutputSampleFormat Format of host output samples. This parameter is ignored for input-only streams. See note about host buffer interleave below.
sampleRate Sample rate of the stream. The more accurate this is the better - it is used for updating time stamps when adapting buffers.
streamFlags Stream flags as passed to Pa_OpenStream, this parameter is used for selecting special sample conversion options such as clipping and dithering.
framesPerUserBuffer Number of frames per user buffer, as requested by the framesPerBuffer parameter to Pa_OpenStream. This parameter may be zero to indicate that the user will accept any (and varying) buffer sizes.
framesPerHostBuffer Specifies the number of frames per host buffer for the fixed buffer size mode, and the maximum number of frames per host buffer for the bounded host buffer size mode. It is ignored for the other modes.
hostBufferSizeMode A mode flag indicating the size variability of host buffers that will be passed to the buffer processor. See PaUtilHostBufferSizeMode for further details.
streamCallback The user stream callback passed to Pa_OpenStream.
userData The user data field passed to Pa_OpenStream.
Note:
The interleave flag is ignored for host buffer formats. Host interleave is determined by the use of different SetInput and SetOutput functions.
Returns:
An error code indicating whether the initialization was successful. If the error code is not PaNoError, the buffer processor was not initialized and should not be used.
See also:
Pa_OpenStream, PaUtilHostBufferSizeMode, PaUtil_TerminateBufferProcessor

References PaUtilBufferProcessor::bytesPerHostInputSample, PaUtilBufferProcessor::bytesPerHostOutputSample, PaUtilBufferProcessor::bytesPerUserInputSample, PaUtilBufferProcessor::bytesPerUserOutputSample, PaUtilBufferProcessor::ditherGenerator, PaUtilBufferProcessor::framesInTempInputBuffer, PaUtilBufferProcessor::framesInTempOutputBuffer, PaUtilBufferProcessor::framesPerHostBuffer, PaUtilBufferProcessor::framesPerTempBuffer, PaUtilBufferProcessor::framesPerUserBuffer, PaUtilBufferProcessor::hostBufferSizeMode, PaUtilBufferProcessor::hostInputChannels, PaUtilBufferProcessor::hostOutputChannels, PaUtilBufferProcessor::initialFramesInTempInputBuffer, PaUtilBufferProcessor::initialFramesInTempOutputBuffer, PaUtilBufferProcessor::inputChannelCount, PaUtilBufferProcessor::inputConverter, PaUtilBufferProcessor::inputZeroer, PaUtilBufferProcessor::outputChannelCount, PaUtilBufferProcessor::outputConverter, PaUtilBufferProcessor::outputZeroer, PA_FRAMES_PER_TEMP_BUFFER_WHEN_HOST_BUFFER_SIZE_IS_UNKNOWN_, Pa_GetSampleSize(), paFramesPerBufferUnspecified, paInsufficientMemory, paInvalidFlag, paNeverDropInput, paNoError, paNonInterleaved, PaUtil_AllocateMemory(), PaUtil_FreeMemory(), PaUtil_InitializeTriangularDitherState(), PaUtil_SelectConverter(), PaUtil_SelectZeroer(), paUtilBoundedHostBufferSize, paUtilFixedHostBufferSize, PaUtilBufferProcessor::samplePeriod, PaUtilBufferProcessor::streamCallback, PaUtilBufferProcessor::tempInputBuffer, PaUtilBufferProcessor::tempInputBufferPtrs, PaUtilBufferProcessor::tempOutputBuffer, PaUtilBufferProcessor::tempOutputBufferPtrs, PaUtilBufferProcessor::useNonAdaptingProcess, PaUtilBufferProcessor::userData, PaUtilBufferProcessor::userInputIsInterleaved, and PaUtilBufferProcessor::userOutputIsInterleaved.

int PaUtil_IsBufferProcessorOutputEmpty ( PaUtilBufferProcessor bufferProcessor  ) 

Determine whether any callback generated output remains in the bufffer processor's internal buffers. This method may be used to determine when to continue calling PaUtil_EndBufferProcessing() after the callback has returned a callbackResult of paComplete.

Parameters:
bufferProcessor The buffer processor.
Returns:
Returns non-zero when callback generated output remains in the internal buffer and zero (0) when there internal buffer contains no callback generated data.

References PaUtilBufferProcessor::framesInTempOutputBuffer.

void PaUtil_ResetBufferProcessor ( PaUtilBufferProcessor bufferProcessor  ) 
void PaUtil_Set2ndInputChannel ( PaUtilBufferProcessor bufferProcessor,
unsigned int  channel,
void *  data,
unsigned int  stride 
)

Use for the second buffer half when the input buffer is split in two halves.

See also:
PaUtil_SetInputChannel

References PaUtilChannelDescriptor::data, PaUtilBufferProcessor::hostInputChannels, and PaUtilChannelDescriptor::stride.

void PaUtil_Set2ndInputFrameCount ( PaUtilBufferProcessor bufferProcessor,
unsigned long  frameCount 
)

Use for the second buffer half when the input buffer is split in two halves.

See also:
PaUtil_SetInputFrameCount

References PaUtilBufferProcessor::hostInputFrameCount.

void PaUtil_Set2ndInterleavedInputChannels ( PaUtilBufferProcessor bufferProcessor,
unsigned int  firstChannel,
void *  data,
unsigned int  channelCount 
)
void PaUtil_Set2ndInterleavedOutputChannels ( PaUtilBufferProcessor bufferProcessor,
unsigned int  firstChannel,
void *  data,
unsigned int  channelCount 
)

Use for the second buffer half when the output buffer is split in two halves.

See also:
PaUtil_SetInterleavedOutputChannels

References PaUtilBufferProcessor::bytesPerHostOutputSample, PaUtilBufferProcessor::outputChannelCount, and PaUtil_Set2ndOutputChannel().

void PaUtil_Set2ndNonInterleavedInputChannel ( PaUtilBufferProcessor bufferProcessor,
unsigned int  channel,
void *  data 
)

Use for the second buffer half when the input buffer is split in two halves.

See also:
PaUtil_SetNonInterleavedInputChannel

References PaUtilChannelDescriptor::data, PaUtilBufferProcessor::hostInputChannels, and PaUtilChannelDescriptor::stride.

void PaUtil_Set2ndNonInterleavedOutputChannel ( PaUtilBufferProcessor bufferProcessor,
unsigned int  channel,
void *  data 
)

Use for the second buffer half when the output buffer is split in two halves.

See also:
PaUtil_SetNonInterleavedOutputChannel

References PaUtil_Set2ndOutputChannel().

void PaUtil_Set2ndOutputChannel ( PaUtilBufferProcessor bufferProcessor,
unsigned int  channel,
void *  data,
unsigned int  stride 
)
void PaUtil_Set2ndOutputFrameCount ( PaUtilBufferProcessor bufferProcessor,
unsigned long  frameCount 
)

Use for the second buffer half when the output buffer is split in two halves.

See also:
PaUtil_SetOutputFrameCount

References PaUtilBufferProcessor::hostOutputFrameCount.

void PaUtil_SetInputChannel ( PaUtilBufferProcessor bufferProcessor,
unsigned int  channel,
void *  data,
unsigned int  stride 
)

Provide the buffer processor with a pointer to a host input channel.

Parameters:
bufferProcessor The buffer processor.
channel The channel number.
data The buffer.
stride The stride from one sample to the next, in samples. For interleaved host buffers, the stride will usually be the same as the number of channels in the buffer.

References PaUtilChannelDescriptor::data, PaUtilBufferProcessor::hostInputChannels, and PaUtilChannelDescriptor::stride.

void PaUtil_SetInputFrameCount ( PaUtilBufferProcessor bufferProcessor,
unsigned long  frameCount 
)

Set the number of frames in the input host buffer(s) specified by the PaUtil_Set*InputChannel functions.

Parameters:
bufferProcessor The buffer processor.
frameCount The number of host input frames. A 0 frameCount indicates to use the framesPerHostBuffer value passed to PaUtil_InitializeBufferProcessor.
See also:
PaUtil_SetNoInput, PaUtil_SetInputChannel, PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel

References PaUtilBufferProcessor::framesPerHostBuffer, and PaUtilBufferProcessor::hostInputFrameCount.

void PaUtil_SetInterleavedInputChannels ( PaUtilBufferProcessor bufferProcessor,
unsigned int  firstChannel,
void *  data,
unsigned int  channelCount 
)

Provide the buffer processor with a pointer to an number of interleaved host input channels.

Parameters:
bufferProcessor The buffer processor.
firstChannel The first channel number.
data The buffer.
channelCount The number of interleaved channels in the buffer. If channelCount is zero, the number of channels specified to PaUtil_InitializeBufferProcessor will be used.

References PaUtilBufferProcessor::bytesPerHostInputSample, PaUtilChannelDescriptor::data, PaUtilBufferProcessor::hostInputChannels, PaUtilBufferProcessor::inputChannelCount, and PaUtilChannelDescriptor::stride.

void PaUtil_SetInterleavedOutputChannels ( PaUtilBufferProcessor bufferProcessor,
unsigned int  firstChannel,
void *  data,
unsigned int  channelCount 
)

Provide the buffer processor with a pointer to a number of interleaved host output channels.

Parameters:
bufferProcessor The buffer processor.
firstChannel The first channel number.
data The buffer.
channelCount The number of interleaved channels in the buffer. If channelCount is zero, the number of channels specified to PaUtil_InitializeBufferProcessor will be used.

References PaUtilBufferProcessor::bytesPerHostOutputSample, PaUtilBufferProcessor::outputChannelCount, and PaUtil_SetOutputChannel().

void PaUtil_SetNoInput ( PaUtilBufferProcessor bufferProcessor  ) 

Indicate that no input is avalable. This function should be used when priming the output of a full-duplex stream opened with the paPrimeOutputBuffersUsingStreamCallback flag. Note that it is not necessary to call this or any othe PaUtil_Set*Input* functions for ouput-only streams.

Parameters:
bufferProcessor The buffer processor.

References PaUtilChannelDescriptor::data, PaUtilBufferProcessor::hostInputChannels, and PaUtilBufferProcessor::inputChannelCount.

void PaUtil_SetNonInterleavedInputChannel ( PaUtilBufferProcessor bufferProcessor,
unsigned int  channel,
void *  data 
)

Provide the buffer processor with a pointer to one non-interleaved host output channel.

Parameters:
bufferProcessor The buffer processor.
channel The channel number.
data The buffer.

References PaUtilChannelDescriptor::data, PaUtilBufferProcessor::hostInputChannels, and PaUtilChannelDescriptor::stride.

void PaUtil_SetNonInterleavedOutputChannel ( PaUtilBufferProcessor bufferProcessor,
unsigned int  channel,
void *  data 
)

Provide the buffer processor with a pointer to one non-interleaved host output channel.

Parameters:
bufferProcessor The buffer processor.
channel The channel number.
data The buffer.

References PaUtil_SetOutputChannel().

void PaUtil_SetNoOutput ( PaUtilBufferProcessor bufferProcessor  ) 

Indicate that the output will be discarded. This function should be used when implementing the paNeverDropInput mode for full duplex streams.

Parameters:
bufferProcessor The buffer processor.

References PaUtilChannelDescriptor::data, PaUtilBufferProcessor::hostOutputChannels, and PaUtilBufferProcessor::outputChannelCount.

void PaUtil_SetOutputChannel ( PaUtilBufferProcessor bufferProcessor,
unsigned int  channel,
void *  data,
unsigned int  stride 
)

Provide the buffer processor with a pointer to a host output channel.

Parameters:
bufferProcessor The buffer processor.
channel The channel number.
data The buffer.
stride The stride from one sample to the next, in samples. For interleaved host buffers, the stride will usually be the same as the number of channels in the buffer.

References PaUtilChannelDescriptor::data, PaUtilBufferProcessor::hostOutputChannels, and PaUtilChannelDescriptor::stride.

Referenced by PaUtil_SetInterleavedOutputChannels(), and PaUtil_SetNonInterleavedOutputChannel().

void PaUtil_SetOutputFrameCount ( PaUtilBufferProcessor bufferProcessor,
unsigned long  frameCount 
)

Set the number of frames in the output host buffer(s) specified by the PaUtil_Set*OutputChannel functions.

Parameters:
bufferProcessor The buffer processor.
frameCount The number of host output frames. A 0 frameCount indicates to use the framesPerHostBuffer value passed to PaUtil_InitializeBufferProcessor.
See also:
PaUtil_SetOutputChannel, PaUtil_SetInterleavedOutputChannels, PaUtil_SetNonInterleavedOutputChannel

References PaUtilBufferProcessor::framesPerHostBuffer, and PaUtilBufferProcessor::hostOutputFrameCount.

void PaUtil_TerminateBufferProcessor ( PaUtilBufferProcessor bufferProcessor  ) 

Terminate a buffer processor's representation. Deallocates any temporary buffers allocated by PaUtil_InitializeBufferProcessor.

Parameters:
bufferProcessor The buffer processor structure to terminate.
See also:
PaUtil_InitializeBufferProcessor.

References PaUtilBufferProcessor::hostInputChannels, PaUtilBufferProcessor::hostOutputChannels, PaUtil_FreeMemory(), PaUtilBufferProcessor::tempInputBuffer, PaUtilBufferProcessor::tempInputBufferPtrs, PaUtilBufferProcessor::tempOutputBuffer, and PaUtilBufferProcessor::tempOutputBufferPtrs.

unsigned long PaUtil_ZeroOutput ( PaUtilBufferProcessor bp,
unsigned long  frameCount 
)

Generated for PortAudio by  doxygen1.6.1