OpenBarnyard
 
Loading...
Searching...
No Matches
ASoundBank Class Reference

#include <ASoundBank.h>

Inheritance diagram for ASoundBank:

Public Member Functions

constexpr ASoundBank (TINT a_iNumSounds)
 
 ~ASoundBank ()
 
void Load ()
 

Friends

class ASoundManager
 

Detailed Description

Definition at line 8 of file ASoundBank.h.

Constructor & Destructor Documentation

◆ ASoundBank()

ASoundBank::ASoundBank ( TINT a_iNumSounds)
inlineconstexpr

Definition at line 14 of file ASoundBank.h.

15 : m_iNumSounds( a_iNumSounds ), m_pSoundsEx( TNULL ), m_pSounds( TNULL )
16 {}
#define TNULL
Definition Typedefs.h:23

◆ ~ASoundBank()

ASoundBank::~ASoundBank ( )
inline

Definition at line 18 of file ASoundBank.h.

19 {
20 if ( m_pSoundsEx )
21 delete[] m_pSoundsEx;
22
23 if ( m_pSounds )
24 delete[] m_pSounds;
25 }

Member Function Documentation

◆ Load()

void ASoundBank::Load ( )
inline

Definition at line 27 of file ASoundBank.h.

28 {
29 for ( TINT i = 0; i < m_iNumSounds; i++ )
30 {
31 for ( TINT k = 0; k < m_pSoundsEx[ i ].GetSamples().Size(); k++ )
32 {
33 ASound::Sample& rSample = m_pSoundsEx[ i ].GetSamples()[ k ];
34 rSample.iFrequency = TINT( rSample.pWaveBank->GetWaveFrequency( rSample.iId ) * rSample.fPitch );
35 }
36 }
37 }
int TINT
Definition Typedefs.h:7
TINT iFrequency
Definition ASound.h:27
AWaveBank * pWaveBank
Definition ASound.h:19
TFLOAT fPitch
Definition ASound.h:24
TINT GetWaveFrequency(TINT a_iWaveIndex)
Definition AWaveBank.cpp:59

Friends And Related Symbol Documentation

◆ ASoundManager

friend class ASoundManager
friend

Definition at line 11 of file ASoundBank.h.


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