OpenBarnyard
Loading...
Searching...
No Matches
ASoundBank.h
Go to the documentation of this file.
1
#pragma once
2
#include "
ASoundLegacy.h
"
3
#include "
ASound.h
"
4
5
#include <
Toshi/T2DList.h
>
6
#include <
Toshi/TPString8.h
>
7
8
class
ASoundBank
:
public
Toshi::T2DList<ASoundBank>
::Node
9
{
10
public
:
11
friend
class
ASoundManager
;
12
13
public
:
14
constexpr
ASoundBank
(
TINT
a_iNumSounds )
15
: m_iNumSounds( a_iNumSounds ), m_pSoundsEx(
TNULL
), m_pSounds(
TNULL
)
16
{}
17
18
~ASoundBank
()
19
{
20
if
( m_pSoundsEx )
21
delete
[] m_pSoundsEx;
22
23
if
( m_pSounds )
24
delete
[] m_pSounds;
25
}
26
27
void
Load
()
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
}
38
39
private
:
40
TINT
m_iNumSounds;
41
Toshi::TPString8 m_strName;
42
ASound
* m_pSoundsEx;
43
ASoundLegacy
* m_pSounds;
44
};
T2DList.h
TPString8.h
TNULL
#define TNULL
Definition
Typedefs.h:23
TINT
int TINT
Definition
Typedefs.h:7
ASound.h
ASoundLegacy.h
Node
ASound
Definition
ASound.h:13
ASound::Sample
Definition
ASound.h:18
ASound::Sample::iId
TINT iId
Definition
ASound.h:20
ASound::Sample::iFrequency
TINT iFrequency
Definition
ASound.h:27
ASound::Sample::pWaveBank
AWaveBank * pWaveBank
Definition
ASound.h:19
ASound::Sample::fPitch
TFLOAT fPitch
Definition
ASound.h:24
ASoundBank::Load
void Load()
Definition
ASoundBank.h:27
ASoundBank::ASoundManager
friend class ASoundManager
Definition
ASoundBank.h:11
ASoundBank::ASoundBank
constexpr ASoundBank(TINT a_iNumSounds)
Definition
ASoundBank.h:14
ASoundBank::~ASoundBank
~ASoundBank()
Definition
ASoundBank.h:18
ASoundLegacy
Definition
ASoundLegacy.h:11
AWaveBank::GetWaveFrequency
TINT GetWaveFrequency(TINT a_iWaveIndex)
Definition
AWaveBank.cpp:59
D:
_dev
OpenBarnyard
Source
OpenBarnyard
Source
Sound
ASoundBank.h
Generated by
1.13.2