Microsoft DirectX 8.1 (Visual Basic)

DirectPlayVoiceClient8.Create3DSoundBuffer

Retrieves a 3-D sound buffer for a player or group. You can use the methods of the 3-D sound buffer object to change the virtual 3-D position of incoming voice transmissions from the specified group or player.

Create3DSoundBuffer(playerID As Long) _
    As DirectSound3dBuffer8

Parts

playerID
Long value that specifies the identification of the player or group for which the user wants to reserve a buffer. You can also specify DVID_REMAINING to create a 3-D user buffer for all players or groups that do not have a user buffer.

Return Values

Returns a DirectSound3dBuffer8 type used for the Microsoft® DirectPlay® Voice main buffer.

Error Codes

If the method fails, Err.Number can be set to one of the following values.

DVERR_INVALIDPARAM
DVERR_NOTCONNECTED
DVERR_SESSIONLOST
DVERR_ALREADYBUFFERED
DVERR_INVALIDPOINTER
DVERR_INVALIDOBJECT
DVERR_NOTINITIALIZED
DVERR_OUTOFMEMORY
DVERR_NOTALLOWED

Remarks

If the DirectPlay Voice session is a mixing server session, this method fails and returns DVERR_NOTALLOWED.

Because the DirectPlay Voice client uses the buffer to stream incoming audio, you can access all the member functions of the 3-D sound buffer object. However, you should not use the Lock, UnLock, or Play methods of the DirectSound3DBuffer object.

When the buffer for the individual user is no longer required or when a player leaves the voice session, it is important to call DirectPlayVoiceClient8.Delete3DSoundBuffer to free up resources.