#include <nw/snd/snd_WaveSoundHandle.h>
void SetVolume(
f32 volume,
int frames = 0
);
| Name | Description | |
|---|---|---|
| in | volume | The volume change ratio (0.0 or greater). |
| in | frames | Number of frames that elapse when the volume changes. |
Changes the volume of the sound.
Changes the volume of the sound associated with the handle. If the handle is invalid, the function does nothing.
The value specified by this function operates independently of other volume parameters, which are mixed together.
The volume argument specifies a ratio of 0.0 or greater. There is no effect on the volume if 1.0 is specified. If 0.0 is specified, no sound is output. The default value is 1.0.
Note: After being combined with the other volume parameters, the final volume is clamped to the range of 0.0 to 2.0. Twice the original volume may not result even if a value of 2.0 is set with this function.
The volume changes over the number of frames specified by frames. If this function is called during a volume change, the volume change takes place over the number of newly specified frames, using the volume value at that point as a reference point.
CONFIDENTIAL