nw::snd::SoundPlayer::SetVolume Member Function

Syntax

#include <nw/snd/snd_SoundPlayer.h>
void SetVolume(
     float volume
);

Arguments

Name Description
in volume Player volume ratio (0.0 or higher).

Return Values

None.

Description

Changes a player's volume.

The player volume affects all sounds currently being played in the player.

The value specified by this function operates independently of all other volume parameters set for sound, 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.

See Also

GetVolume

Revision History

2010/01/15
Initial version.

CONFIDENTIAL