nw::snd::SequenceSoundHandle::SetTrackPitch Member Function#include <nw/snd/snd_SequenceSoundHandle.h>
void SetTrackPitch(
u32 trackBitFlag,
f32 pitch
);
| Name | Description | |
|---|---|---|
| trackBitFlag | Bit flag for each track. | |
| pitch | The frequency ratio of the pitch change. |
Changes the track pitch of the sequence sound.
Changes the sequence track pitch 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 low-pass filter cut-off parameters, which are all superimposed on top of each other.
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 pitch changed. For example, to change the pitch of Track 2 and Track 5, use (1 << 2) | (1 << 5); i.e., 0x0024.
pitch specifies the frequency ratio. In other words, there is no effect on the pitch if 1.0 will be specified. When 2.0 is specified, the frequency to be reproduced is doubled, and the pitch is one octave higher. If 0.5 is specified, the pitch will be one octave lower. The default value is 1.0.
CONFIDENTIAL