summaryrefslogtreecommitdiff
path: root/include/nw4r/snd/snd_NoteOnCallback.h
blob: 68143e260b2180ebd0db2361a4d388ceae5f72e7 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef NW4R_SND_NOTE_ON_CALLBACK_H
#define NW4R_SND_NOTE_ON_CALLBACK_H

/*******************************************************************************
 * headers
 */

#include "common.h" // u32

#include "nw4r/snd/snd_Channel.h"

/*******************************************************************************
 * types
 */

// forward declarations
namespace nw4r { namespace snd { namespace detail { class SeqPlayer; }}}

namespace nw4r { namespace snd { namespace detail
{
	// [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x2dd4c
	struct NoteOnInfo
	{
		int					prgNo;					// size 0x04, offset 0x00
		int					key;					// size 0x04, offset 0x04
		int					velocity;				// size 0x04, offset 0x08
		int					length;					// size 0x04, offset 0x0c
		int					initPan;				// size 0x04, offset 0x10
		int					priority;				// size 0x04, offset 0x14
		int					voiceOutCount;			// size 0x04, offset 0x18
		Channel::Callback	*channelCallback;		// size 0x04, offset 0x1c
		u32			channelCallbackData;	// size 0x04, offset 0x20
	}; // size 0x24
}}} // namespace nw4r::snd::detail

/*******************************************************************************
 * classes and functions
 */

namespace nw4r { namespace snd { namespace detail
{
	// [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x2e4ab
	class NoteOnCallback
	{
	// methods
	public:
		// cdtors
		virtual ~NoteOnCallback() {}

		// virtual function ordering
		// vtable NoteOnCallback
		virtual Channel *NoteOn(SeqPlayer *seqPlayer, int bankNo,
		                        NoteOnInfo const &noteOnInfo) = 0;

	// members
	private:
		/* vtable */	// size 0x04, offset 0x00
	}; // size 0x04
}}} // namespace nw4r::snd::detail

#endif // NW4R_SND_NOTE_ON_CALLBACK_H