blob: 7cbe3073a476959f12f5877cac50539f2f01ff26 (
plain)
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
|
#include "AudioBank.h"
namespace SM64 {
CtlEntry* AudioBank::GetPointer() {
return &mData;
}
size_t AudioBank::GetPointerSize() {
return sizeof(mData);
}
AudioBank::~AudioBank() {
for (auto& instrument : instruments) {
if (instrument != nullptr) {
if (instrument->envelope != nullptr) {
delete[] instrument->envelope;
instrument->envelope = nullptr;
}
delete instrument;
}
}
for (auto& drum : drums) {
delete drum;
}
instruments.clear();
drums.clear();
}
}
|