CXAPOBase::ProcessThru Method

Called by an IXAPO::Process implementation when an XAPO is disabled for thru processing.

Syntax

protected:
void ProcessThru(
         const void *pInputBuffer,
         FLOAT32 *pOutputBuffer,
         UINT32 FrameCount,
         UINT32 InputChannelCount,
         UINT32 OutputChannelCount,
         BOOL MixWithOutput
)  

Parameters

pInputBuffer
Type: void *

Pointer to a buffer containing the input audio data.

pOutputBuffer
Type: FLOAT32 *

[in, out] Pointer to a buffer that will contain the processed audio data.

FrameCount
Type: UINT32 

Number of frames of audio data to process, where a frame is a block of samples, one per channel of audio data.

InputChannelCount
Type: UINT32 

Number of channels in the input data buffer.

OutputChannelCount
Type: UINT32 

Number of channels in the output data buffer.

MixWithOutput
Type: BOOL 

TRUE to mix with the destination buffer, FALSE to overwrite the destination buffer.

Return value

None.

Remarks

ProcessThru copies/mixes data from source to destination, making as few changes as possible to the audio data. However, ProcessThru is capable of channel upmix and downmix.

This function may be called if:

  1. The XAPO is locked and disabled.
  2. The number of source frames equals the number of destination frames.
  3. The output format is FLOAT32.
  4. input format is INT8, INT16, INT20 (contained in 24 or 32 bits), INT24 (contained in 24 or 32 bits), INT32, or FLOAT32.

For in-place processing (where the input buffer equals the output buffer) this function does nothing.

When writing a ProcessThru method it is important to note XAudio2 audio data is interleaved, data from each channel is adjacent for a particular sample number. For example if there was a 4 channel wave playing into an XAudio2 source voice, the audio data would be a sample of channel 0, a sample of channel 1, a sample of channel 2, a sample of channel 3, and then the next sample of channels 0, 1, 2, 3, etc.

Requirements

Header: Declared in xapobase.h.

Library: Use xapobase.lib.

See also

CXAPOBase

CXAPOBase Members