natiny_audio_source_set_pitch
void natiny_audio_source_set_pitch(NatinyAudioSource source, float pitch);
Sets a source's playback-speed and pitch multiplier.
Parameters
| Name | Type | Description |
|---|---|---|
source |
NatinyAudioSource |
Source handle |
pitch |
float |
Multiplier; 1.0f uses the recorded speed |
Example
natiny_audio_source_set_pitch(source, 1.25f);
Notes
2.0fplays twice as fast and one octave higher;0.5fplays half as fast and one octave lower.- Values are clamped to
0.05f .. 16.0f. Changing pitch does not restart the source. - Invalid and non-source handles are ignored.