Microsoft DirectX 8.1 (Visual Basic) |
The CreatePrimarySoundBuffer method creates a primary buffer object that can be used to change the format of the audio output and to obtain a DirectSound3DListener8 object.
Syntax
object.CreatePrimarySoundBuffer( _
bufferDesc As DSBUFFERDESC _
) As DirectSoundPrimaryBuffer8
Parts
object
Resolves to a DirectSound8 object.
bufferDesc
DSBUFFERDESC type that specifies the description of the sound buffer to create. The lBufferBytes member must be 0, and lFlags must contain DSBCAPS_PRIMARYBUFFER.
Return Values
Returns a DirectSoundPrimaryBuffer8 object.
Error Codes
If the method fails, an error is raised and Err.Number may be one of the following error values.
DSERR_ALLOCATED |
DSERR_BADFORMAT |
DSERR_OUTOFMEMORY |
DSERR_UNINITIALIZED |
DSERR_UNSUPPORTED |