diff options
| author | MonsterDruide1 <5958456@gmail.com> | 2021-06-23 00:34:02 +0200 |
|---|---|---|
| committer | MonsterDruide1 <5958456@gmail.com> | 2021-06-23 00:34:02 +0200 |
| commit | 8da7d7cf25f225b7c8d22b299e2c9fac23fd2f3a (patch) | |
| tree | 99060d148aaf20e8d6e2db30631feee7b18a9510 /src/KingSystem/Sound/sndResource.cpp | |
| parent | 1851180b260d55b368a5f7d0faf3a55a0522e705 (diff) | |
ksys/snd: Add SoundResource
Diffstat (limited to 'src/KingSystem/Sound/sndResource.cpp')
| -rw-r--r-- | src/KingSystem/Sound/sndResource.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/KingSystem/Sound/sndResource.cpp b/src/KingSystem/Sound/sndResource.cpp new file mode 100644 index 00000000..df3f6b7d --- /dev/null +++ b/src/KingSystem/Sound/sndResource.cpp @@ -0,0 +1,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
\ No newline at end of file |
