Amuse
AudioGroupProject.hpp
1 #ifndef __AMUSE_AUDIOGROUPPROJECT_HPP__
2 #define __AMUSE_AUDIOGROUPPROJECT_HPP__
3 
4 #include "Entity.hpp"
5 #include <vector>
6 #include <array>
7 #include <unordered_map>
8 
9 namespace amuse
10 {
11 
14 {
15  const uint16_t* m_soundMacroIndex;
16  const uint16_t* m_tablesIndex;
17  const uint16_t* m_keymapsIndex;
18  const uint16_t* m_layersIndex;
19 };
20 
23 {
25  struct PageEntry
26  {
27  ObjectId objId;
28  uint8_t priority;
29  uint8_t maxVoices;
30  uint8_t programNo;
31  uint8_t pad;
32  };
33  std::unordered_map<uint8_t, const PageEntry*> m_normPages;
34  std::unordered_map<uint8_t, const PageEntry*> m_drumPages;
35 
37  struct MIDISetup
38  {
39  uint8_t programNo;
40  uint8_t volume;
41  uint8_t panning;
42  uint8_t reverb;
43  uint8_t chorus;
44  };
45  std::unordered_map<int, const std::array<MIDISetup, 16>*> m_midiSetups;
46 };
47 
50 {
52  struct SFXEntry
53  {
54  uint16_t defineId;
55  ObjectId objId;
56  uint8_t priority;
57  uint8_t maxVoices;
58  uint8_t defVel;
59  uint8_t panning;
60  uint8_t defKey;
61  uint8_t pad;
62  };
63  std::unordered_map<uint16_t, const SFXEntry*> m_sfxEntries;
64 };
65 
68 {
69  std::unordered_map<int, SongGroupIndex> m_songGroups;
70  std::unordered_map<int, SFXGroupIndex> m_sfxGroups;
71 public:
72  AudioGroupProject(const unsigned char* data);
73 
74  const SongGroupIndex* getSongGroupIndex(int groupId) const;
75  const SFXGroupIndex* getSFXGroupIndex(int groupId) const;
76 
77  const std::unordered_map<int, SongGroupIndex>& songGroups() const {return m_songGroups;}
78  const std::unordered_map<int, SFXGroupIndex>& sfxGroups() const {return m_sfxGroups;}
79 };
80 
81 }
82 
83 #endif // __AMUSE_AUDIOGROUPPROJECT_HPP__