U64Dev.h
2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#ifndef _AE_U64Dev_h
#define _AE_U64Dev_h
#include "Assets.h"
#include "GioMgr.h"
#include "AudioApp.h"
#define DEF_BANK_PER_BANKFILE 16
#define DEF_INST_PER_BANK 128
#define DEF_SND_PER_INST 32
#define DEF_BOOK_SIZE 128
typedef struct {
int dataType;
u8 *startAddr;
u8 *endAddr;
AEAsset *refAsset;
int maxArray;
} U64Block;
typedef struct
{
u8 *romStart;
int size;
} smplBlock;
class U64Device
{
protected:
List *usedBlocks;
List *freeBlocks;
List *usedSmpl;
List *freeSmpl;
int u64State;
u8 *codeEnd;
u8 *bmemStart;
u8 *bmemEnd;
u8 *bmemCur;
u8 *smemStart;
u8 *smemEnd;
u8 *smemCur;
GioMgr *theGioMgr;
void _AssembleBook(AEBook *book, ALADPCMBook *buf);
void _AssembleLoop(AELoop *loop, ALADPCMloop *buf);
void _AssembleWavet(AEWavet *wavet, ALWaveTable *buf);
void _AssembleEnvlp(AEEnvlp *envlp, ALEnvelope *buf);
void _AssembleKeymap(AEKeymap *keymap, ALKeyMap *buf);
void _AssembleSound(AESound *sound, ALSound *buf);
void _AssembleInst(AEInst *inst, ALInstrument *buf);
void _AssembleBank(AEBank *bank, ALBank *buf);
void _AssembleBankFile(AEBankFile *bankfile, ALBankFile *buf);
public:
U64Device();
~U64Device();
// Init and create items should report success or failure
int InitDevice(AudioConfig *audCnfg);
int StartDevice(AEBankFile *bankf, int bankNum);
int SendMidiBlock(CommPckt *cp);
int UpdateSmplMem(int flags);
int UpdateAssets(int flags);
int AllocSmplMem(AEWavet *wavet, int len);
void DeallocSmplMem(AEWavet *wavet);
int AllocHdwr(AEAsset* refAsset, int assetClass);
void DeallocHdwr(AEAsset* refAsset);
void UpdateBook(AEBook *book);
void UpdateLoop(AELoop *loop);
void UpdateWavet(AEWavet *wavet);
void UpdateKeymap(AEKeymap *keymap);
void UpdateEnvlp(AEEnvlp *envlp);
void UpdateSound(AESound *sound);
void UpdateInst(AEInst *inst);
void UpdateBank(AEBank *bank);
void UpdateBankList(AEBankFile *bankF);
void UpdateInstVol(AEInst *inst);
void UpdateInstPan(AEInst *inst);
void UpdateInstPriority(AEInst *inst);
void UpdateInstBendRange(AEInst *inst);
void UpdateFXParam(int paramID, int paramVal);
};
#endif