Microsoft SDK for Java

setFrequency

This method of the DirectSoundBuffer Class sets the frequency at which the audio samples are played.

Syntax

public void setFrequency(int frequency);

Parameters

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.

Remarks

Increasing or decreasing the frequency changes the perceived pitch of the audio data. This method does not affect the format of the buffer.

See Also

getFrequency, play, setFormat, com.ms.directX.DirectSound

© 1999 Microsoft Corporation. All rights reserved. Terms of use.