"L. Spiro Engine"
Public Member Functions | Protected Member Functions | Protected Attributes | Friends

lss::CSoundBufferEx Class Reference

Extending the sound buffer with the ability to load files. More...

#include <LSSSoundBufferEx.h>

Inheritance diagram for lss::CSoundBufferEx:
lss::CSoundBuffer

List of all members.

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

Detailed Description

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.


Member Function Documentation

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.

Returns:
Returns true if this buffer is allowed to softly unload or false if not.

Reimplemented from lss::CSoundBuffer.

LSE_INLINE const LSCHAR *LSE_CALL lss::CSoundBufferEx::GetPath ( ) const

Get our path.

Returns:
Returns the path to the buffer.
LSVOID LSE_CALL lss::CSoundBufferEx::SetSoftUnloading ( LSBOOL  _bValue)

Allow or disallow soft unloading.

Parameters:
_bValueValue indicating whether soft unloading is allowed or not.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator