Microsoft DirectX 8.0 (C++)

IDirectSoundBuffer8

Used to manage sound buffers.

The IDirectSoundBuffer8 interface supersedes IDirectSoundBuffer and adds new methods.

To obtain the interface, use the IDirectSound8::CreateSoundBuffer method to retrieve IDirectSoundBuffer, and then pass IID_IDirectSoundBuffer8 to IDirectSoundBuffer::QueryInterface.

For primary sound buffers, you must use the IDirectSoundBuffer interface. IDirectSoundBuffer8 is not available. IDirectSoundBuffer is not documented separately. For documentation, see the corresponding IDirectSoundBuffer8 methods.

Not all methods of IDirectSoundBuffer are valid for primary buffers. For example, SetCurrentPosition will fail. See the reference topics for individual methods.

The IDirectSoundBuffer8 methods can be organized into the following groups:

Effects GetObjectInPath
  SetFX
Information GetCaps
  GetFormat
  GetStatus
  SetFormat
Memory management AcquireResources
  Initialize
  Restore
Play management GetCurrentPosition
  Lock
  Play
  SetCurrentPosition
  Stop
  Unlock
Sound management GetFrequency
  GetPan
  GetVolume
  SetFrequency
  SetPan
  SetVolume

All COM interfaces inherit the IUnknown interface methods. This interface supports the following three methods:

IUnknown AddRef
  QueryInterface
  Release

The following table shows which methods are supported for buffer objects obtained from an audiopath; that is, buffers created by a DirectMusic performance. Mix-in buffers accept sends from other buffers.All other buffers in the audiopath are sink-in buffers, which means that they accept data only from the synthesizer sink.

IDirectSoundBuffer8 method Mix-in Sink-in
AcquireResources    
GetCaps Yes Yes
GetCurrentPosition    
GetFormat Yes Yes
GetFrequency    
GetObjectInPath Yes Yes
GetPan Yes Yes
GetStatus Yes Yes
GetVolume Yes Yes
Initialize    
Lock    
Play Yes  
Restore    
SetCurrentPosition    
SetFormat    
SetFrequency    
SetFX Yes Yes
SetPan Yes Yes
SetVolume Yes Yes
Stop Yes  
Unlock    

The LPDIRECTSOUNDBUFFER8 type is defined as a pointer to the IDirectSoundBuffer interface:

typedef struct IDirectSoundBuffer8    *LPDIRECTSOUNDBUFFER8; 

Requirements

  Header: Declared in dsound.h.