NNS_SndPlayerMoveVolume

Syntax

#include <nnsys/snd.h>
void NNS_SndPlayerMoveVolume(
        NNSSndHandle* handle,
        int targetVolume,
        int frames );

Arguments

handle The sound handle pointer.
targetVolume Volume value. Takes a value between 0 and 127.
frames Frame count over which to change.

Return Values

None.

Description

Gradually changes sequence volume.

The current volume value changes gradually over the number of frames to the volume value set with volume.

The volume of the sequence that is bound to the Sound Handle is changed. This function does not perform any action if the stream handle is invalid.

When frames is set to 0, the current volume value changes immediately. For example, when the volume is changed from a certain value that is unrelated to the current volume value to another targeted value, call this function with frames set to 0. After changing the current volume value, specify the target volume value with a second call to this function

Immediately after a sequence begins, the volume is 0. The volume changes to 127 with the next NNS_SndMain(). Therefore, if this function is called directly after a sequence begins, a fade-in effect can be achieved when the volume gradually increases from 0 to the targeted volume.

This volume value is independent of the NNS_SndPlayerSetVolume() value but can also be used with it. However, the value that is set here is ignored during a fadeout.

See Also

NNS_SndMain, NNS_SndPlayerSetVolume

Revision History

2004/06/01 Revised to state that the Sound Handle binds to the sequence.
2004/04/01 Initial version.


CONFIDENTIAL