SFXDSBuffer

Engine/source/sfx/dsound/sfxDSBuffer.h

DirectSound SFXBuffer implementation.

More...

Public Friends

class

Protected Attributes

IDirectSoundBuffer8 *

The buffer used when duplication is allowed.

IDirectSound8 *
bool

We set this to true when the original buffer has been handed out and duplicates need to be made.

bool

Protected Functions

SFXDSBuffer(IDirectSound8 * dsound, const ThreadSafeRef< SFXStream > & stream, SFXDescription * description, bool useHardware)
bool
_copyData(U32 offset, const U8 * data, U32 length)

Copy "length" bytes from "data" into the device at "offset".

bool
_createBuffer(IDirectSoundBuffer8 ** buffer8)

Set up a DirectSound buffer.

bool
_duplicateBuffer(IDirectSoundBuffer8 ** buffer8)

Flush all queue state for this buffer on the device.

Public Static Functions

create(IDirectSound8 * dsound, const ThreadSafeRef< SFXStream > & stream, SFXDescription * description, bool useHardware)

Public Functions

bool
createVoice(IDirectSoundBuffer8 ** buffer)
releaseVoice(IDirectSoundBuffer8 ** buffer)

Detailed Description

DirectSound SFXBuffer implementation.

Note that the actual sound buffer held by the buffer may get duplicated around for individual voices. This is kind of ugly as the resulting buffers aren't tied to a SFXDSBuffer anymore.

Private Types

typedef SFXInternal::SFXWrapAroundBuffer Parent 

Public Friends

Protected Attributes

IDirectSoundBuffer8 * mBuffer 

The buffer used when duplication is allowed.

IDirectSound8 * mDSound 
bool mDuplicate 

We set this to true when the original buffer has been handed out and duplicates need to be made.

bool mIs3d 
bool mUseHardware 

Protected Functions

SFXDSBuffer(IDirectSound8 * dsound, const ThreadSafeRef< SFXStream > & stream, SFXDescription * description, bool useHardware)

~SFXDSBuffer()

_copyData(U32 offset, const U8 * data, U32 length)

Reimplemented from: SFXInternal::SFXWrapAroundBuffer

_createBuffer(IDirectSoundBuffer8 ** buffer8)

Set up a DirectSound buffer.

note:

This method will not fill the buffer with data.

note:

If this is a streaming buffer, the resulting buffer will have its notification positions set up and already be registered with SFXDSStreamThread.

_duplicateBuffer(IDirectSoundBuffer8 ** buffer8)

_flush()

Reimplemented from: SFXInternal::SFXWrapAroundBuffer

Public Static Functions

create(IDirectSound8 * dsound, const ThreadSafeRef< SFXStream > & stream, SFXDescription * description, bool useHardware)

Public Functions

createVoice(IDirectSoundBuffer8 ** buffer)

releaseVoice(IDirectSoundBuffer8 ** buffer)