Description
The Pitch
property of the SoundHandle
class represents the pitch of the sound. It is a float
value that can be adjusted to change the frequency of the sound being played. A higher pitch value will make the sound play at a higher frequency, while a lower pitch value will decrease the frequency.
Usage
To modify the pitch of a sound, you can set the Pitch
property on an instance of SoundHandle
. This allows you to dynamically adjust the sound's pitch during playback.
Example
// Create a sound handle instance
SoundHandle soundHandle = new SoundHandle();
// Set the pitch of the sound to 1.5 (50% higher than the original pitch)
soundHandle.Pitch = 1.5f;
// Play the sound with the modified pitch
soundHandle.Play();