gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

romPool.h (552B)


      1 #pragma once
      2 
      3 #include <cstdint>
      4 #include <map>
      5 #include <mutex>
      6 #include <vector>
      7 #include <string>
      8 
      9 namespace baseLib
     10 {
     11 	class MD5;
     12 }
     13 
     14 namespace bridgeServer
     15 {
     16 	struct Config;
     17 	using RomData = std::vector<uint8_t>;
     18 
     19 	class RomPool
     20 	{
     21 	public:
     22 		RomPool(Config& _config);
     23 
     24 		const RomData& getRom(const baseLib::MD5& _hash);
     25 		void addRom(const std::string& _name, const RomData& _data);
     26 
     27 	private:
     28 		std::string getRootPath() const;
     29 		void findRoms();
     30 
     31 		const Config& m_config;
     32 
     33 		std::mutex m_mutex;
     34 		std::map<baseLib::MD5, RomData> m_roms;
     35 	};
     36 }