AXSetDeviceRemixMatrix

Syntax

#include <cafe/ax.h>

AXPB_ERROR_CODE AXSetDeviceRemixMatrix( AXPBDeviceType device,  
                                        u32 const      numInChns,  
                                        u32 const      numOutChns, 
                                        f32 const      *matrixPtr
                                        );

Parameters

device Output device.
numInChns Number of input channels
numOutChns Number of output channels
matrixPtr Pointer to an array of [numOutChns]×[numInChns] floating-point values, allocated by the user. This array must be allocated on the heap, since AX retains the pointer to the array and does not copy the values in the array to internal arrays.

Return Values

AXPB_ERROR_NONE if successful, an error of type AXPB_ERROR_CODE otherwise.

Description

Uses the matrix provided to upmix/downmix the final output that is destined for device.

The equation for the remix is given by:

    O = M * I

where:

Multiple matrices can be registered to AX for various pairings of numInChns and numOutChns for each device.

Previously registered matrices for the given input/output pairing are overwritten by this function. Overwriting with NULL removes them.

AX applies the matrix in the following way:

Users must pay attention to the entries in the matrices. The sum of absolute values of elements in a row should be less than or equal to 1. Negative entries are allowed, to implement phase inversions.

NOTE:
The remix matrix arrays that the user provides should be allocated on the heap. AX uses the array allocated by the user while doing remix matrix operations. It does not copy the array internally. Because of this, if the user overwrites the array and/or allocates on the stack, unintended noise will occur.

Availability

Library Version Availability
Sound 2.0 Yes
Sound 1.0 Yes

Do Not Call From

None.

See Also

AXRegisterDeviceFinalMixCallback
AXGetDeviceRemixMatrix
AXGetDeviceUpsampleStage
AXSetDeviceUpsampleStage

Revision History

2013/05/08 Automated cleanup pass.
2012/01/26 Update to Audio API v2.0.
2011/02/21 Initial Version


CONFIDENTIAL