typedef struct _AXPBVE { u16 currentVolume; // volume at start of frame, 0x8000 = 1.0 s16 currentDelta; // signed per sample delta (160 samples per frame) } AXPBVE;
The VE values are used to store context for the volume envelope.
The currentDelta parameter dictates how the volume will change for the current frame (or until it has been modified by an update directive). The currentDelta value will be added to the currentVolume value on a per-sample basis.
Note: The DSP does not clamp this computation. Your audio application is responsible for ensuring that the computation remains within bounds. Please see the MIX application library for an example of this computation.
Note: currentDelta can only modify currentVolume in multiples of 160 per audio frame. Please see the MIX library source code for an example of AXPBVE usage.
To synchronize the AXPBVE structure, assert the AX_SYNC_USER_VE bit in the axvpb.sync word.
Assert the AX_SYNC_USER_VEDELTA bit when only the delta value has changed.
axvpb.sync
AXSetVoiceVe
AXSetVoiceVeDelta
03/01/2006 Initial version.