mirror of https://github.com/AxioDL/amuse.git
Add MIDI-setup reading
This commit is contained in:
parent
04382030a1
commit
60f873e76e
|
@ -35,7 +35,7 @@ struct SongGroupIndex : AudioGroupIndex
|
|||
uint8_t reverb;
|
||||
uint8_t chorus;
|
||||
};
|
||||
std::unordered_map<int, std::array<const MIDISetup*, 16>> m_midiSetups;
|
||||
std::unordered_map<int, const std::array<MIDISetup, 16>*> m_midiSetups;
|
||||
};
|
||||
|
||||
/** Root index of SFXGroup */
|
||||
|
|
|
@ -70,6 +70,17 @@ AudioGroupProject::AudioGroupProject(const unsigned char* data)
|
|||
idx.m_drumPages[drumEntries->programNo] = drumEntries;
|
||||
++drumEntries;
|
||||
}
|
||||
|
||||
/* MIDI setups */
|
||||
const uint8_t* setupData = data + header.midiSetupsOff;
|
||||
const uint8_t* setupEnd = data + header.groupEndOff;
|
||||
while (setupData < setupEnd)
|
||||
{
|
||||
uint32_t songId = SBig(*reinterpret_cast<const uint32_t*>(setupData));
|
||||
idx.m_midiSetups[songId] =
|
||||
reinterpret_cast<const std::array<SongGroupIndex::MIDISetup, 16>*>(setupData + 4);
|
||||
setupData += 5 * 16 + 4;
|
||||
}
|
||||
}
|
||||
else if (header.type == GroupType::SFX)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue