Microsoft SDK for Java

DirectSoundBuffer Class Methods

The DirectSoundBuffer Class contains the following methods:

get3dBuffer retrieves a DirectSound3dBuffer object for the DirectSound buffer.
get3dListener retrieves a DirectSound3dListener object for the DirectSound buffer.
getCaps retrieves the capabilities of the DirectSoundBuffer object.
getCurrentPosition retrieves the current position of the play and write cursors in the sound buffer.
getFormat retrieves a description of the format of the sound data in the buffer.
getFormatSize retrieves the size of the format information.
getFrequency retrieves the frequency, in samples per second, at which the buffer is being played.
getPan retrieves a variable that represents the relative volume between the left and right audio channels.
getStatus retrieves the current status of the sound buffer.
getVolume retrieves the current volume for this sound buffer.
play causes the sound buffer to play from the current position.
restore restores the memory allocation for a lost sound buffer for the specified DirectSoundBuffer object.
setCurrentPosition moves the current play cursor for secondary sound buffers.
setFormat sets the format of the primary sound buffer for the application.
setFrequency sets the frequency at which the audio samples are played.
setPan specifies the relative volume between the left and right channels.
setVolume changes the volume of a sound buffer.
stop causes the sound buffer to stop playing.
transferToSoundBuffer transfers the wave data from the given resource to the start of the sound buffer.
writeBuffer writes the contents of a buffer to the given position in the sound buffer.

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