blob: df3f6b7dfeb94aabc1dff5b12bb8f88cc24c5b05 (
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
|
#include "KingSystem/Sound/sndResource.h"
#include <heap/seadDisposer.h>
#include <heap/seadExpHeap.h>
#include <heap/seadFrameHeap.h>
namespace ksys::snd {
SEAD_SINGLETON_DISPOSER_IMPL(SoundResource)
SoundResource::~SoundResource() {
mSoundResourceHeap->destroy();
_30->destroy();
if (mSoundDebugHeap)
mSoundDebugHeap->destroy();
}
void SoundResource::init(sead::Heap* heap, sead::Heap* debug_heap, bool extra_large) {
mSoundResourceHeap =
sead::FrameHeap::create(extra_large ? 0x9583000 : 0x6383000, "SoundResource", heap, 0x1000,
sead::FrameHeap::cHeapDirection_Forward, false);
if (debug_heap)
mSoundDebugHeap = sead::ExpHeap::create(0x1E00000u, "SoundDebug", debug_heap, 0x1000,
sead::ExpHeap::cHeapDirection_Forward, false);
}
} // namespace ksys::snd
|