#include <nnsys/snd.h>
void NNS_SndArcStrmMoveVolume( NNSSndStrmHandle* handle, int volume, int frames );
handle |
Pointer to a stream handle. |
volume |
Volume value. Takes a value between 0 and 127. |
frames |
Number of frames over which to change. |
This function changes the volume of the stream that is connected to the stream handle handle
. This function does not perform any action if the stream handle is invalid.
The current volume value changes gradually over the number of frames
to the volume value set with volume
.
When frames
is set to 0, the current volume value changes immediately. For example, to change the volume from a value unrelated to the current volume value to yet a third value, first call this function with frames
set to 0. After updating the current volume value, specify the target volume value with a second call to this function.
Immediately after a stream starts, the value of the volume is 0, but it changes to 127 with the next call to the NNS_SndMain function. By calling this function immediately after starting a stream, a fade-in effect can be obtained where the volume is gradually raised from zero to the specified value.
The effect of this volume value is independent of the value in NNS_SndArcStrmsSetVolume
. These two values have cumulative effects. However, the value set with this function is ignored during a fadeout.
NNS_SndMain
, NNS_SndArcStrmSetVolume
2006/08/18 Added link to the NNS_SndArcStrmSetVolume
function
2004/08/10 Initial version
CONFIDENTIAL