AXSetMultiVoiceVe

Syntax

#include <cafe/ax.h>
    
void AXSetMultiVoiceVe(AXMVPB *mv, const AXPBVE *ve);

Parameters

mv Pointer to the specified multi-voice.
ve Pointer to structure of type AXPBVE. Values are initialized by the user audio application.

Return Values

None.

Description

AXSetMultiVoiceVe sets the volume envelope settings for each voice of a multi-voice. The envelope settings include the following.

currentVolume Set the currentVolume setting to a value between 0x0000 (silent) and 0x8000 (full volume).
currentDelta The value of currentDelta is added to the currentVolume for each audio sample that the voice plays in the next frame. Use this setting to prevent zipping artifacts when making large volume changes.

To ramp the volume of a voice between two values over the course of a single audio frame, set the currentDelta as follows.

    currentDelta = (TargetVolume - CurrentVolume) / AX_IN_SAMPLES_PER_FRAME

When using the voice delta alone, there is a limit to the precision with which the volume of the voice may be changed. To set the volume to the exact target volume, it is recommended that AXSetMultiVoiceVe be called in the next frame.

To change only the volume delta value, use AXSetMultiVoiceVeDelta.

Availability

Library Version Availability
Sound 2.0 Yes
Sound 1.0 No

Do Not Call From

None.

See Also

AXPBVE
AXSetMultiVoiceVeDelta

Revision History

2014/08/20 Removal of struct; defined elsewhere.
2013/10/20 Initial version.


CONFIDENTIAL