Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
SeqSound.h
Go to the documentation of this file.
1#ifndef NW4HBM_SND_SEQ_SOUND_H
2#define NW4HBM_SND_SEQ_SOUND_H
3
4#include <revolution/types.h>
5
6#include "debug.h"
7
8#include "../ut/LinkList.h"
9
10namespace nw4hbm {
11 namespace snd {
12
13 class SeqSoundHandle;
14
15 namespace detail {
16 class NoteOnCallback;
17 class SeqTrackAllocator;
18 class SeqPlayer;
19 class BasicSound;
20 template <typename T>
21 class SoundInstanceManager;
22 } // namespace detail
23
24 namespace detail {
25 class SeqSound : public BasicSound {
26 friend class SeqSoundHandle;
27
28 public:
29 typedef void (*NotifyAsyncEndCallback)(bool result, const void* seqBase,
30 s32 seqOffset, void* userData);
31
33 public:
34 typedef enum Result {
35 /* 0 */ RESULT_SUCCESS = 0,
38 /* 3 */ RESULT_ASYNC,
39 /* 4 */ RESULT_RETRY
41
42 /* 0x08 */ virtual ~SeqLoadCallback() {}
44 void* callbackArg, u32 userData) const = 0;
45 /* 0x10 */ virtual void CancelLoading(u32 userData) const = 0;
46 };
47
49
51 /* 0x28 */ virtual void Shutdown();
52 /* 0x4C */ virtual void SetPlayerPriority(int priority);
53 /* 0x50 */ virtual bool IsAttachedTempSpecialHandle();
54 /* 0x54 */ virtual void DetachTempSpecialHandle();
55 /* 0x58 */ virtual void InitParam();
56 /* 0x68 */ virtual BasicPlayer& GetBasicPlayer() { return mSeqPlayer; }
57 /* 0x6C */ virtual const BasicPlayer& GetBasicPlayer() const { return mSeqPlayer; }
58
59 SeqPlayer::SetupResult Setup(SeqTrackAllocator* trackAllocator, u32 allocTrackFlags,
60 int voices, NoteOnCallback* callback);
61
62 void Prepare(const void* seqBase, s32 seqOffset);
63 void Prepare(const SeqLoadCallback* callback, u32 callbackData);
64
65 void SetChannelPriority(int priority);
66
67 private:
68 static void NotifyLoadAsyncEndSeqData(bool result, const void* seqBase,
69 s32 seqOffset, void* userData);
70
71 /* 0x0D8 */ SeqPlayer mSeqPlayer;
74 /* 0x1E8 */ bool mLoadingFlag;
75 /* 0x1EC */ const SeqLoadCallback* mCallback;
76 /* 0x1F0 */ u32 mCallbackData;
77 };
78
79 } // namespace detail
80 } // namespace snd
81} // namespace nw4hbm
82
83#endif
Definition SeqSoundHandle.h:12
Definition BasicSound.h:30
Definition NoteOnCallback.h:25
Definition SeqPlayer.h:27
SetupResult
Definition SeqPlayer.h:39
virtual void CancelLoading(u32 userData) const =0
virtual ~SeqLoadCallback()
Definition SeqSound.h:42
virtual Result LoadData(SeqSound::NotifyAsyncEndCallback callback, void *callbackArg, u32 userData) const =0
Definition SeqSound.h:25
virtual const BasicPlayer & GetBasicPlayer() const
Definition SeqSound.h:57
virtual BasicPlayer & GetBasicPlayer()
Definition SeqSound.h:56
const SeqLoadCallback * mCallback
Definition SeqSound.h:75
void Prepare(const SeqLoadCallback *callback, u32 callbackData)
SeqPlayer mSeqPlayer
Definition SeqSound.h:71
void(*) NotifyAsyncEndCallback(bool result, const void *seqBase, s32 seqOffset, void *userData)
Definition SeqSound.h:29
virtual void SetPlayerPriority(int priority)
void Prepare(const void *seqBase, s32 seqOffset)
SeqPlayer::SetupResult Setup(SeqTrackAllocator *trackAllocator, u32 allocTrackFlags, int voices, NoteOnCallback *callback)
static void NotifyLoadAsyncEndSeqData(bool result, const void *seqBase, s32 seqOffset, void *userData)
SeqSound(SoundInstanceManager< SeqSound > *nanager)
SeqSoundHandle * mTempSpecialHandle
Definition SeqSound.h:72
NW4HBM_UT_RUNTIME_TYPEINFO
Definition SeqSound.h:50
bool mLoadingFlag
Definition SeqSound.h:74
virtual void DetachTempSpecialHandle()
void SetChannelPriority(int priority)
SoundInstanceManager< SeqSound > * mManager
Definition SeqSound.h:73
virtual bool IsAttachedTempSpecialHandle()
u32 mCallbackData
Definition SeqSound.h:76
Definition SeqTrackAllocator.h:11
unsigned long u32
Definition types.h:12
signed long s32
Definition types.h:11
Definition HBMAnmController.h:6
static void callback(u32 param_0)
Definition OSExec.c:308