|Microsoft DirectX 9.0|
The IDirectSoundBuffer8 interface is 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.
Not all methods of IDirectSoundBuffer are valid for primary buffers. For example, SetCurrentPosition will fail. See the reference topics for individual methods.
In addition to the methods inherited from IUnknown, the IDirectSoundBuffer8 interface exposes the following methods, arranged by category.
|GetObjectInPath||Retrieves an interface for an effect object associated with the buffer.|
|SetFX||Enables effects on a buffer.|
|AcquireResources||Allocates resources for a buffer that was created with the DSBCAPS_LOCDEFER flag.|
|Restore||Restores the memory allocation for a lost sound buffer|
|GetCurrentPosition||Retrieves the position of the play and write cursors in the sound buffer.|
|Lock||Readies all or part of the buffer for a data write and returns pointers to which data can be written.|
|Play||Causes the sound buffer to play, starting at the play cursor.|
|SetCurrentPosition||Sets the position of the play cursor, which is the point at which the next byte of data is read from the buffer.|
|Stop||Causes the sound buffer to stop playing.|
|Unlock||Releases a locked sound buffer.|
|GetFrequency||Retrieves the frequency, in samples per second, at which the buffer is playing.|
|GetPan||Retrieves the relative volume of the left and right audio channels.|
|GetVolume||Retrieves the attenuation of the sound.|
|SetFrequency||Sets the frequency at which the audio samples are played.|
|SetPan||Sets the relative volume of the left and right channels.|
|SetVolume||Sets the attenuation of the sound.|
|GetCaps||Retrieves the capabilities of the buffer object.|
|GetFormat||Retrieves a description of the format of the sound data in the buffer, or the buffer size needed to retrieve the format description.|
|GetStatus||Retrieves the status of the sound buffer.|
|Initialize||Initializes a sound buffer object if it has not yet been initialized.|
|SetFormat||Sets the format of the
The following table shows which methods are supported for buffer objects obtained from a DirectMusic audiopath. Mix-in buffers accept sends from other buffers, and exist only in audiopath configurations created in DirectMusic Producer. All other buffers in the audiopath are sink-in buffers, which means that they accept data only from the synthesizer sink.
The LPDIRECTSOUNDBUFFER8 type is defined as a pointer to the IDirectSoundBuffer interface:
typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8;
Header: Declared in dsound.h.