nw::snd::SequenceSoundHandle::SetTrackVolume Member Function

Syntax

#include <nw/snd/snd_SequenceSoundHandle.h>
void SetTrackVolume(
     u32 trackBitFlag,
     f32 volume
);

Arguments

Name Description
in trackBitFlag Bit flag for each track.
in volume Volume change ratio.

Return Values

None.

Description

Changes the volume of a track in a sequence sound.

Changes the volume of a sequence track in 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 trackBitFlag argument specifies the track. The tracks are identified from the lower bit in sequence: Track 0, Track 1, Track 2 .... All tracks with enabled bits will have their volume changed. For example, to change the volume of Track 2 and Track 5, use (1 << 2) | (1 << 5); i.e., 0x0024.

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.

Revision History

2010/06/25
Corrected a mistake (silent status > volume).
2010/01/22
Initial version.

CONFIDENTIAL