"L. Spiro Engine"
|
Extending the sound buffer with the ability to load files. More...
#include <LSSSoundBufferEx.h>
Public Member Functions | |
LSE_INLINE const LSCHAR *LSE_CALL | GetPath () const |
virtual LSBOOL LSH_CALL | CanSoftUnload () const |
LSVOID LSE_CALL | SetSoftUnloading (LSBOOL _bValue) |
Protected Member Functions | |
LSE_CALLCTOR | CSoundBufferEx (const LSUINT8 *_pui8Data, LSUINT32 _ui32Length, LSUINT32 _ui32Freq, LSUINT32 _ui32Bits, LSUINT32 _ui32Channels, CAllocator *_paAllocator, LSBOOL _bRetain, LSUINTPTR _uiptrUserData) |
Protected Attributes | |
LSCHAR * | m_pcFile |
LSBOOL | m_bSoftUnload |
Friends | |
class | CSoundManagerEx |
Extending the sound buffer with the ability to load files.
Class CSoundBufferEx Description: Adding the ability to load data from files to the sound engine. We use the user parameter passed to the constructor (_uiptrUserData) as a LSCHAR * indicating the file to load. The name of the file is copied locally.
virtual LSBOOL LSH_CALL lss::CSoundBufferEx::CanSoftUnload | ( | ) | const [virtual] |
Set the value indicating whether this buffer should resist soft unloads or not. A soft unload is an unload that is used to save RAM even though it is assumed the buffer may be needed (and will be reloaded) later. A hard unload is performed to force all buffers out of memory. A hard unload always destroys and releases the buffer, whereas a soft unload is optional and can only be done on buffers with a zero reference count. For a soft unload to work, there must be a way to restore the buffer to its current state after being completely unloaded. The core library adds the ability to load sound data from files, which provides this ability. Soft unloading is used with registered sound effects that are set to load on demand.
Reimplemented from lss::CSoundBuffer.
LSE_INLINE const LSCHAR *LSE_CALL lss::CSoundBufferEx::GetPath | ( | ) | const |
Get our path.
LSVOID LSE_CALL lss::CSoundBufferEx::SetSoftUnloading | ( | LSBOOL | _bValue | ) |
Allow or disallow soft unloading.
_bValue | Value indicating whether soft unloading is allowed or not. |