#pragma once #include #include #include #include #include #include #include #include #include #include "Instrument.hh" namespace ResourceDASM { namespace Audio { struct SequenceProgram { uint32_t index; std::string data; SequenceProgram(uint32_t index, std::string&& data); }; struct SoundEnvironment { std::unordered_map instrument_banks; std::unordered_map> sample_banks; std::unordered_map sequence_programs; void resolve_pointers(); void merge_from(SoundEnvironment&& other); }; struct InstrumentMetadata { std::string filename; int16_t base_note; }; SoundEnvironment load_sound_environment(const char* aw_directory); SoundEnvironment create_midi_sound_environment(const std::unordered_map& instrument_metadata); SoundEnvironment create_json_sound_environment(const phosg::JSON& instruments_json, const std::string& directory); } // namespace Audio } // namespace ResourceDASM