Main Page · Modules · All Classes · Class Hierarchy
Public Member Functions | Private Attributes | List of all members
MASoundMemory Class Reference

Sound buffer in memory. More...

#include <MASoundMemory.hpp>

Inheritance diagram for MASoundMemory:
MASoundBase

Public Member Functions

 MASoundMemory (const std::string &display_name, MC::BinaryDataSPtr sound_data)
 Class constructor. More...
 
virtual int GetSize () const
 Get the sound data size. More...
 
virtual bool IsValid () const
 Check if the sound data is valid. More...
 
virtual bool IsCached () const
 Check if the sound data is cached. More...
 
virtual void AddToBuffer (int position, int count, int32_t *buffer)
 Add sound data to a buffer. More...
 
- Public Member Functions inherited from MASoundBase
 MASoundBase (const std::string &display_name)
 Class constructor. More...
 
std::string GetDisplayName () const
 Get the display name. More...
 
bool IsEffect () const
 Check if the sound is an effect. More...
 

Private Attributes

MC::BinaryDataSPtr Data
 Sound data.
 

Detailed Description

Sound buffer in memory.

Definition at line 38 of file MASoundMemory.hpp.

Constructor & Destructor Documentation

MASoundMemory::MASoundMemory ( const std::string &  display_name,
MC::BinaryDataSPtr  sound_data 
)

Class constructor.

Parameters
display_nameDisplay name
sound_dataSound data in-memory buffer

Definition at line 26 of file MASoundMemory.cpp.

Member Function Documentation

void MASoundMemory::AddToBuffer ( int  position,
int  count,
int32_t *  buffer 
)
virtual

Add sound data to a buffer.

Parameters
positionPosition in buffer
countCount to be copied
bufferTarget buffer

Implements MASoundBase.

Definition at line 51 of file MASoundMemory.cpp.

int MASoundMemory::GetSize ( ) const
virtual

Get the sound data size.

Returns
Sound data size

Implements MASoundBase.

Definition at line 33 of file MASoundMemory.cpp.

bool MASoundMemory::IsCached ( ) const
virtual

Check if the sound data is cached.

Returns
True if cached otherwise false.

Implements MASoundBase.

Definition at line 45 of file MASoundMemory.cpp.

bool MASoundMemory::IsValid ( ) const
virtual

Check if the sound data is valid.

Returns
True if valid otherwise false.

Implements MASoundBase.

Definition at line 39 of file MASoundMemory.cpp.


The documentation for this class was generated from the following files: