summaryrefslogtreecommitdiff
path: root/mm/2s2h/resource/type/AudioSoundFont.cpp
blob: 7f323ddf480eaef2c37b71cb95dfc39e54457159 (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 "AudioSoundFont.h"

namespace SOH {

AudioSoundFont::~AudioSoundFont() {
    for (auto i : instrumentAddresses) {
        if (i != nullptr) {
            delete[] i->envelope;
            delete i;
        }
    }

    for (auto d : drumAddresses) {
        if (d != nullptr) {
            delete[] d->envelope;
            delete d;
        }
    }
}

SoundFont* AudioSoundFont::GetPointer() {
    return &soundFont;
}

size_t AudioSoundFont::GetPointerSize() {
    return sizeof(SoundFont);
}
} // namespace SOH