NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
snd_SoundArchiveLoader.h
1
#ifndef NW4R_SND_SOUND_ARCHIVE_LOADER_H
2
#define NW4R_SND_SOUND_ARCHIVE_LOADER_H
3
#include "nw4r/types_nw4r.h"
4
#include "nw4r/ut.h"
// IWYU pragma: export
5
#include <revolution/OS.h>
// IWYU pragma: export
6
7
namespace
nw4r {
8
namespace
snd {
9
10
// Forward declarations
11
class
SoundMemoryAllocatable
;
12
13
namespace
detail {
14
15
class
FileStreamHandle {
16
public
:
17
FileStreamHandle(
ut::FileStream
*pFileStream) : mStream(pFileStream) {}
18
19
~FileStreamHandle() {
20
if
(mStream != NULL) {
21
mStream->Close();
22
}
23
}
24
25
ut::FileStream
*GetFileStream() {
26
return
mStream;
27
}
28
29
ut::FileStream
*operator->() {
30
return
mStream;
31
}
32
33
operator
bool()
const
{
34
return
mStream;
35
}
36
37
private
:
38
ut::FileStream
*mStream;
// at 0x0
39
};
40
41
class
SoundArchiveLoader {
42
public
:
43
explicit
SoundArchiveLoader(
const
SoundArchive
&rArchive);
44
~SoundArchiveLoader();
45
46
void
*LoadGroup(ulong
id
,
SoundMemoryAllocatable
*pAllocatable,
void
**ppWaveBuffer, ulong blockSize);
47
s32 ReadFile(ulong,
void
*, s32, s32);
48
void
*LoadFile(ulong
id
,
SoundMemoryAllocatable
* pAllocatable);
49
50
private
:
51
mutable
OSMutex
mMutex;
// at 0x0
52
const
SoundArchive
&mArc;
// at 0x18
53
u8 mStreamArea[512];
// at 0x1C
54
ut::FileStream
*mStream;
// at 0x21C
55
};
56
57
}
// namespace detail
58
}
// namespace snd
59
}
// namespace nw4r
60
61
#endif
nw4r::snd::SoundArchive
Definition
snd_SoundArchive.h:29
nw4r::snd::SoundMemoryAllocatable
Definition
snd_SoundMemoryAllocatable.h:18
nw4r::ut::FileStream
Definition
ut_FileStream.h:10
OSMutex
Definition
OSMutex.h:9
include
lib
nw4r
snd
snd_SoundArchiveLoader.h
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.13.2