Microsoft DirectX 8.1 (Visual Basic) |
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
Returns a DirectSound3dBuffer8 type used for the Microsoft® DirectPlay® Voice main buffer.
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 |
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.