Microsoft SDK for Java

DirectSoundBuffer Class

Applications use the methods of the DirectSoundBuffer Class of the com.ms.directX package to create DirectSoundBuffer objects and set up the environment.

public class DirectSoundBuffer implements IDirectSoundBuffer
{
  // Methods
  public DirectSound3dBuffer get3dBuffer();
  public DirectSound3dListener get3dListener();
  public void getCaps(DSBCaps caps);
  public void getCurrentPosition(DSCursors cursors);
  public void getFormat(byte[] format, int size);
  public WaveFormatEx getFormat();
  public int getFormatSize();
  public int getFrequency();
  public int getPan();
  public int getStatus();
  public int getVolume();
  public void play(int flags);
  public void restore();
  public void setCurrentPosition(int newPosition);
  public void setFormat(byte[] format);
  public void setFormat(WaveFormatEx format);
  public void setFrequency(int frequency);
  public void setPan(int pan);
  public void setVolume(int volume);
  public void stop();
  public void transferToSoundBuffer(DSResourceDesc resourceDesc,
        int flags);
  public void writeBuffer(int start, int size, byte[] buffer,
        int flags);
}

Note   This class does not provide an initialize method. Use the DirectSound.createSoundBuffer method to create and initialize DirectSoundBuffer objects.

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