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

Base class for sounds. More...

#include <MASoundBase.hpp>

Inheritance diagram for MASoundBase:
MASoundFile MASoundMemory

Public Member Functions

 MASoundBase (const std::string &display_name)
 Class constructor. More...
 
virtual int GetSize () const =0
 Get the sound data size. More...
 
std::string GetDisplayName () const
 Get the display name. More...
 
bool IsEffect () const
 Check if the sound is an effect. More...
 
virtual bool IsValid () const =0
 Check if the sound data is valid. More...
 
virtual bool IsCached () const =0
 Check if the sound data is cached. More...
 
virtual void AddToBuffer (int position, int count, int32_t *buffer)=0
 Add sound data to a buffer. More...
 

Private Attributes

std::string DisplayName
 Display name.
 
bool Effect
 Whether the sound is an effect.
 

Detailed Description

Base class for sounds.

Definition at line 45 of file MASoundBase.hpp.

Constructor & Destructor Documentation

MASoundBase::MASoundBase ( const std::string &  display_name)
explicit

Class constructor.

Parameters
display_nameDisplay name

Definition at line 24 of file MASoundBase.cpp.

Member Function Documentation

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

Add sound data to a buffer.

Parameters
positionPosition in buffer
countCount to be copied
bufferTarget buffer

Implemented in MASoundMemory, and MASoundFile.

std::string MASoundBase::GetDisplayName ( ) const

Get the display name.

Returns
Display name

Definition at line 35 of file MASoundBase.cpp.

virtual int MASoundBase::GetSize ( ) const
pure virtual

Get the sound data size.

Returns
Sound data size

Implemented in MASoundMemory, and MASoundFile.

virtual bool MASoundBase::IsCached ( ) const
pure virtual

Check if the sound data is cached.

Returns
True if cached otherwise false.

Implemented in MASoundMemory, and MASoundFile.

bool MASoundBase::IsEffect ( ) const

Check if the sound is an effect.

Returns
True if the sound is an effect otherwise false.

Definition at line 41 of file MASoundBase.cpp.

virtual bool MASoundBase::IsValid ( ) const
pure virtual

Check if the sound data is valid.

Returns
True if valid otherwise false.

Implemented in MASoundMemory, and MASoundFile.


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