nn::snd::CTR::Voice::SetPitch Member Function
void SetPitch(
f32 pitch
);
| Name | Description | |
|---|---|---|
| in | pitch | Ratio of the playback speed to the sampling rate. |
Sets the pitch of a voice.
This sets the ratio of the playback speed to the sound source sampling rate set by the nn::snd::CTR::Voice::SetSampleRate function (a ratio of 1.0 indicates that the playback speed and sampling rate are the same). For example, if you specify a sampling rate of 32kHz and a pitch of 0.5, the audio is played at 16kHz.
The maximum value that can be specified for the pitch is 255.0f. The minimum value is 1.0 / (2^23). However, because the processing load increases significantly when a large value is set for the pitch, whether you can actually play sounds accurately depends greatly on the snd usage status.
The default value is 1.0.
CONFIDENTIAL