summaryrefslogtreecommitdiff
path: root/src/egg/audio/eggAudioHeapMgr.cpp
blob: 28e93e63f02aca45900daf0d21894291c677170c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "egg/audio/eggAudioHeapMgr.h"

namespace EGG {

void SoundHeapMgr::createSoundHeap(Allocator *allocator, u32 size) {
    if (!mSoundHeap.IsValid()) {
        void *ptr = allocator->alloc(size);
        if (ptr != nullptr) {
            mSoundHeap.Create(ptr, size);
        }
    }
}

void SoundHeapMgr::destroySoundHeap() {
    mSoundHeap.Destroy();
}

} // namespace EGG