Microsoft DirectX 8.1 (Visual Basic)

DirectSoundPrimaryBuffer8

The DirectSoundPrimaryBuffer8 class represents the primary sound buffer.

An object of the DirectSoundPrimaryBuffer8 class can be obtained by using the DirectSound8.CreatePrimarySoundBuffer method. Typically a primary buffer object is used to set the output format and to obtain a 3-D listener that controls global sound parameters. Specialized applications can handle the mixing of data into the primary buffer, but normally this is handled by DirectSound when secondary buffers are played.

The methods of this class can be organized into the following groups.

Data streaming

Method Description
Play Causes the primary buffer to play.
ReadBuffer Reads a portion of the buffer and stores the data in an application buffer.
Stop Causes the buffer to stop playing.
WriteBuffer Writes audio data to the buffer.

Parameters

Method Description
GetCurrentPosition Retrieves the position of the play and write cursors.
GetDirectSound3DListener Creates a listener object.
GetFormat Retrieves a description of the wave format of the buffer.
GetPan Retrieves the relative volume between the left and right audio channels.
GetStatus Retrieves the status of the buffer.
GetVolume Retrieves the sound volume of the buffer.
SetFormat Sets the format of the buffer.
SetPan Specifies the relative volume between the left and right channels.
SetVolume Changes the sound volume of the buffer.

Miscellaneous

Method Description
GetCaps Retrieves the capabilities of the buffer.
Restore Restores the memory allocation for a lost sound buffer.

See Also