NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
snd_SoundHeap.h
1
#ifndef NW4R_SND_SOUND_HEAP_H
2
#define NW4R_SND_SOUND_HEAP_H
3
#include "nw4r/snd/snd_FrameHeap.h"
4
#include "nw4r/snd/snd_SoundMemoryAllocatable.h"
5
#include "nw4r/ut.h"
// IWYU pragma: export
6
#include <revolution/OS.h>
// IWYU pragma: export
7
8
9
namespace
nw4r {
10
namespace
snd {
11
12
class
SoundHeap :
public
SoundMemoryAllocatable
{
13
public
:
14
SoundHeap();
15
virtual
~SoundHeap();
// at 0x8
16
17
virtual
void
*Alloc(ulong size);
// at 0xC
18
19
void
*Alloc(ulong size, detail::FrameHeap::FreeCallback pCallback,
void
*pCallbackArg);
20
21
bool
Create(
void
*pBase, ulong size);
22
void
Destroy();
23
24
void
Clear();
25
26
int
SaveState();
27
void
LoadState(
int
id
);
28
29
bool
IsValid() {
30
return
mFrameHeap.IsValid();
31
}
32
33
int
GetCurrentLevel()
const
{
34
ut::detail::AutoLock<OSMutex>
lock(mMutex);
35
return
mFrameHeap.GetCurrentLevel();
36
}
37
38
ulong GetFreeSize()
const
{
39
ut::detail::AutoLock<OSMutex>
lock(mMutex);
40
return
mFrameHeap.GetFreeSize();
41
}
42
43
private
:
44
static
void
DisposeCallbackFunc(
void
*pBuffer, ulong size,
void
*pCallbackArg);
45
46
private
:
47
mutable
OSMutex
mMutex;
// at 0x0
48
detail::FrameHeap
mFrameHeap;
// at 0x1C
49
};
50
51
}
// namespace snd
52
}
// namespace nw4r
53
54
#endif
nw4r::snd::SoundMemoryAllocatable
Definition
snd_SoundMemoryAllocatable.h:18
nw4r::snd::detail::FrameHeap
Definition
snd_FrameHeap.h:11
nw4r::ut::detail::AutoLock
Definition
ut_lock.h:30
OSMutex
Definition
OSMutex.h:9
include
lib
nw4r
snd
snd_SoundHeap.h
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.13.2