# Amuse: include/amuse/AudioGroupProject.hpp Source File

AudioGroupProject.hpp
#ifndef __AMUSE_AUDIOGROUPPROJECT_HPP__
#define __AMUSE_AUDIOGROUPPROJECT_HPP__
#include "Entity.hpp"
#include <vector>
#include <array>
#include <unordered_map>
namespace amuse
{
struct AudioGroupIndex
{
const uint16_t* m_soundMacroIndex;
const uint16_t* m_tablesIndex;
const uint16_t* m_keymapsIndex;
const uint16_t* m_layersIndex;
};
struct SongGroupIndex : AudioGroupIndex
{
struct PageEntry
{
ObjectId objId;
uint8_t priority;
uint8_t maxVoices;
uint8_t programNo;
uint8_t pad;
};
std::unordered_map<uint8_t, const PageEntry*> m_normPages;
std::unordered_map<uint8_t, const PageEntry*> m_drumPages;
struct MIDISetup
{
uint8_t programNo;
uint8_t volume;
uint8_t panning;
uint8_t reverb;
uint8_t chorus;
};
std::unordered_map<int, const std::array<MIDISetup, 16>*> m_midiSetups;
};
struct SFXGroupIndex : AudioGroupIndex
{
struct SFXEntry
{
uint16_t defineId;
ObjectId objId;
uint8_t priority;
uint8_t maxVoices;
uint8_t defVel;
uint8_t panning;
uint8_t defKey;
uint8_t pad;
};
std::unordered_map<uint16_t, const SFXEntry*> m_sfxEntries;
};
class AudioGroupProject
{
std::unordered_map<int, SongGroupIndex> m_songGroups;
std::unordered_map<int, SFXGroupIndex> m_sfxGroups;
public:
AudioGroupProject(const unsigned char* data);
const SongGroupIndex* getSongGroupIndex(int groupId) const;
const SFXGroupIndex* getSFXGroupIndex(int groupId) const;
const std::unordered_map<int, SongGroupIndex>& songGroups() const {return m_songGroups;}
const std::unordered_map<int, SFXGroupIndex>& sfxGroups() const {return m_sfxGroups;}
};
}
#endif // __AMUSE_AUDIOGROUPPROJECT_HPP__
amuse::SFXGroupIndex::SFXEntry
Definition: AudioGroupProject.hpp:52
amuse::SFXGroupIndex
Definition: AudioGroupProject.hpp:49
amuse::SongGroupIndex::MIDISetup
Definition: AudioGroupProject.hpp:37
amuse::AudioGroupIndex
Definition: AudioGroupProject.hpp:13
amuse::SongGroupIndex
Definition: AudioGroupProject.hpp:22
amuse
Definition: AudioGroup.hpp:8
amuse::SongGroupIndex::PageEntry
Definition: AudioGroupProject.hpp:25
amuse::AudioGroupProject
Definition: AudioGroupProject.hpp:67