Space Fighter
A "shmup" game for Computer Programming C++
Loading...
Searching...
No Matches
KatanaEngine::AudioSample Class Reference

Represents a 2D grid of texels. More...

#include <AudioSample.h>

Inheritance diagram for KatanaEngine::AudioSample:

Public Member Functions

 AudioSample ()
 
virtual ~AudioSample ()
 
virtual bool Load (const std::string &path, ResourceManager *pManager)
 Load the desired font into memory.
 
virtual bool IsCloneable () const
 Used to determine if the texture is cloneable.
 
virtual bool Play ()
 
virtual void SetLooping (const bool loop=true)
 
virtual void SetVolume (const float volume)
 
- Public Member Functions inherited from KatanaEngine::Resource
virtual ~Resource ()
 
unsigned short GetResourceID () const
 Gets the ID of the resource.
 

Static Public Member Functions

static void ReserveSamples (int count)
 

Protected Member Functions

virtual void SetSample (ALLEGRO_SAMPLE *pSample)
 
- Protected Member Functions inherited from KatanaEngine::Resource
void Split (const std::string &line, const char delimeter, std::vector< std::string > &elements)
 Splits a string into a vector of strings.
 
void ParseComments (std::string &line)
 Removes c-style, single-line comments from a line of text.
 
void TrimLine (std::string &line)
 Removes white-space at the front and end of a line of text.
 
ResourceManager * GetResourceManager ()
 Gets a pointer to the ResourceManager that was used to load the resource.
 
virtual Resource * Clone ()
 Clones a resource.
 

Detailed Description

Represents a 2D grid of texels.

Definition at line 20 of file AudioSample.h.

Constructor & Destructor Documentation

◆ AudioSample()

KatanaEngine::AudioSample::AudioSample ( )

Definition at line 21 of file AudioSample.cpp.

◆ ~AudioSample()

KatanaEngine::AudioSample::~AudioSample ( )
virtual

Definition at line 31 of file AudioSample.cpp.

Member Function Documentation

◆ IsCloneable()

virtual bool KatanaEngine::AudioSample::IsCloneable ( ) const
inlinevirtual

Used to determine if the texture is cloneable.

Returns
Returns true if the texture is clonable, false otherwise.
Remarks
Textures should usually not be cloneable.

Implements KatanaEngine::Resource.

Definition at line 39 of file AudioSample.h.

◆ Load()

bool KatanaEngine::AudioSample::Load ( const std::string & path,
ResourceManager * pManager )
virtual

Load the desired font into memory.

Parameters
pathThe path to the desired font.
pManagerA pointer to the ResourceManager that will manage the font.
Returns
Returns true if the font was loaded, false otherwise.

Implements KatanaEngine::Resource.

Definition at line 39 of file AudioSample.cpp.

◆ Play()

bool KatanaEngine::AudioSample::Play ( )
virtual

Definition at line 48 of file AudioSample.cpp.

◆ ReserveSamples()

static void KatanaEngine::AudioSample::ReserveSamples ( int count)
inlinestatic

Definition at line 28 of file AudioSample.h.

◆ SetLooping()

void KatanaEngine::AudioSample::SetLooping ( const bool loop = true)
virtual

Definition at line 53 of file AudioSample.cpp.

◆ SetSample()

void KatanaEngine::AudioSample::SetSample ( ALLEGRO_SAMPLE * pSample)
protectedvirtual

Definition at line 64 of file AudioSample.cpp.

◆ SetVolume()

void KatanaEngine::AudioSample::SetVolume ( const float volume)
virtual

Definition at line 58 of file AudioSample.cpp.


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