OpenBarnyard
 
Loading...
Searching...
No Matches
ASound.h
Go to the documentation of this file.
1#pragma once
2#include "ASoundLegacy.h"
3#include "ARandom.h"
4#include "Memory/AMemory.h"
5
6#include <Toshi/TBitArray.h>
7#include <Toshi/T2Vector.h>
9
10class AWaveBank;
11
12class ASound
13{
14public:
15 friend class ASoundManager;
16
32
33public:
34 ASound();
35
36 TINT GetFirstWaveForTrack( TINT a_iTrack ) const;
37
38 TINT GetRandomSample( TINT a_iWaveIndexMin, TINT a_iWaveIndexMax );
39
40 TINT GetRandomSampleWeighted( TINT a_iTrackIndex, TINT a_iWaveIndexMin, TINT a_iWaveIndexMax );
41
42 Toshi::T2DynamicVector<Sample>& GetSamples() { return m_vecSamples; }
43
44private:
45 TINT m_iFlags;
46 TINT m_iId;
47 TINT m_uiCategoryIndex;
48 TUINT8 m_ui8Priority;
49 TFLOAT m_fMinDist;
50 Toshi::T2DynamicVector<Sample> m_vecSamples;
51 Toshi::T2DynamicVector<TINT> m_vecTracks;
52 Toshi::TBitArray m_TrackLoop;
53 Toshi::T2Vector<TINT, 15> m_vecLoopStarts;
54};
uint8_t TUINT8
Definition Typedefs.h:17
float TFLOAT
Definition Typedefs.h:4
#define TNULL
Definition Typedefs.h:23
int TINT
Definition Typedefs.h:7
Dynamic vector container for the Toshi engine.
TINT GetRandomSample(TINT a_iWaveIndexMin, TINT a_iWaveIndexMax)
Definition ASound.cpp:26
ASound()
Definition ASound.cpp:12
friend class ASoundManager
Definition ASound.h:15
TINT GetFirstWaveForTrack(TINT a_iTrack) const
Definition ASound.cpp:17
TINT GetRandomSampleWeighted(TINT a_iTrackIndex, TINT a_iWaveIndexMin, TINT a_iWaveIndexMax)
Definition ASound.cpp:31
Toshi::T2DynamicVector< Sample > & GetSamples()
Definition ASound.h:42
TFLOAT fMinPitch
Definition ASound.h:25
TFLOAT fVolume
Definition ASound.h:21
TFLOAT fVarDelay
Definition ASound.h:29
TFLOAT fMinVolumeMultiplier
Definition ASound.h:22
TFLOAT fMaxPitch
Definition ASound.h:26
TFLOAT fMaxVolumeMultiplier
Definition ASound.h:23
TINT iFrequency
Definition ASound.h:27
TFLOAT fStart
Definition ASound.h:28
TINT iWeight
Definition ASound.h:30
AWaveBank * pWaveBank
Definition ASound.h:19
TFLOAT fPitch
Definition ASound.h:24