SFXALDevice Class Reference

#include <sfxALDevice.h>

Inheritance diagram for SFXALDevice:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SFXALDevice (SFXProvider *provider, const OPENALFNTABLE &openal, const char *name, bool useHardware, S32 maxBuffers)
virtual ~SFXALDevice ()
const char * getName () const
 Returns the name of this device.
SFXBuffercreateBuffer (SFXProfile *profile)
 Tries to create a new sound buffer.
SFXVoicecreateVoice (bool is3D, SFXBuffer *buffer)
void deleteVoice (SFXVoice *buffer)
U32 getVoiceCount () const
void update (const SFXListener &listener)
 Called from SFXSystem to do any updates the device may need to make.

Protected Attributes

const StringTableEntry mName
SFXALVoiceVector mVoices
SFXALBufferVector mBuffers
OPENALFNTABLE mOpenAL
ALCcontext * mContext
ALCdevice * mDevice

Private Types

typedef SFXDevice Parent

Member Typedef Documentation

typedef SFXDevice SFXALDevice::Parent [private]


Constructor & Destructor Documentation

SFXALDevice::SFXALDevice ( SFXProvider provider,
const OPENALFNTABLE openal,
const char *  name,
bool  useHardware,
S32  maxBuffers 
)

virtual SFXALDevice::~SFXALDevice (  )  [virtual]


Member Function Documentation

const char* SFXALDevice::getName (  )  const [inline, virtual]

Returns the name of this device.

Implements SFXDevice.

SFXBuffer* SFXALDevice::createBuffer ( SFXProfile profile  )  [virtual]

Tries to create a new sound buffer.

If creation fails freeing another buffer will usually allow a new one to be created.

Parameters:
is3d True if a 3D sound buffer is desired.
channels The number of sound channels... typically 1 or 2.
frequency The number of samples per second ( a sample includes all channels ).
bitsPerSample The number of bits per sample ( a sample includes all channels ).
dataSize The total size of the buffer in bytes.
Returns:
Returns a new buffer or NULL if one cannot be created.

Implements SFXDevice.

SFXVoice* SFXALDevice::createVoice ( bool  is3D,
SFXBuffer buffer 
) [virtual]

Implements SFXDevice.

void SFXALDevice::deleteVoice ( SFXVoice buffer  )  [virtual]

Implements SFXDevice.

U32 SFXALDevice::getVoiceCount (  )  const [inline, virtual]

Implements SFXDevice.

void SFXALDevice::update ( const SFXListener listener  )  [virtual]

Called from SFXSystem to do any updates the device may need to make.

Implements SFXDevice.


Member Data Documentation

ALCcontext* SFXALDevice::mContext [protected]

ALCdevice* SFXALDevice::mDevice [protected]