AXSetVoiceDeviceMix

Syntax

#include <cafe/ax.h>

AXPB_ERROR_CODE AXSetVoiceDeviceMix(AXVPB *voice, AXPBDeviceType device,
				    u32 Id, AXPBCHMIX *mix); 

Parameters

voice Pointer to the voice.
device Output device.
Id Device instance.
mix Pointer to an array of AXPBCHMIX data structures.

Return Values

Zero if successful, an error of type AXPB_ERROR_CODE otherwise.

Description

Applies the mixing values in the mix data structure to the output device (specified by device and Id) of voice.

The values in the mix data structure define what volume a voice will be played at on each bus of each channel of a given device. If a voice has a nonzero volume on a given bus, it will have its audio data played on that bus, increasing the computational load of playing the voice.

The size of the array pointed by mix should be the max number of channels for the device. For TV, the mix should be pointing to an array of AX_MAX_NUM_TV_CHS (6 for Wii U); for DRC, it should be pointing an array of size AX_MAX_NUM_DRC_CHS and for remotes AX_MAX_NUM_RMT_CHS. The size of the array pointed by mix is independent of the output mode for the device. If the user wants to mix to less than maximum channels for the device, user has to explicitly zero out the volumes and deltas for other channels.

It is recommended that the mixes for AUX busses are zeroed when calling this function for remotes, even though remotes do not support AUX.

This function is not to be confused with functions in the MIX library. The MIX library is essentially built upon this function and provides high-level control over AXPBCHMIX structures for each voice.

Compatibility

Library Version Compatibility
Sound 2.0 Yes
Sound 1.0 Yes

Do Not Call From

None.

See Also

AXPBCHMIX

Revision History

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


CONFIDENTIAL