This method of the DirectSoundBuffer Class sets the frequency at which the audio samples are played.
public void setFrequency(int frequency);
frequency | New frequency, in Hz, at which to play the audio samples. The value must be between 100 and 100,000. If the value is 0, the frequency is reset to the current buffer format. This format is specified in the createSoundBuffer method. |
Increasing or decreasing the frequency changes the perceived pitch of the audio data. This method does not affect the format of the buffer.
getFrequency, play, setFormat, com.ms.directX.DirectSound