3 #ifndef SPECTMORPH_INSTENCCACHE_HH
4 #define SPECTMORPH_INSTENCCACHE_HH
6 #include "smwavdata.hh"
7 #include "smencoder.hh"
8 #include "sminstrument.hh"
21 std::vector<unsigned char> data;
22 uint64 read_stamp = 0;
28 std::map<std::string, CacheData> cache;
29 std::mutex cache_mutex;
30 const std::regex cache_file_re;
31 uint64 cache_read_stamp = 0;
33 void cache_save_L (
const std::string& key);
34 void cache_try_load_L (
const std::string& key,
const std::string& need_version);
35 Audio *cache_lookup (
const std::string& cache_key,
const std::string& version);
36 void cache_add (
const std::string& cache_key,
const std::string& version,
const Audio *audio);
38 void delete_old_files();
39 void delete_old_memory_L();
48 Audio *encode (
Group *group,
const WavData& wav_data,
const std::string& wav_data_hash,
50 const std::function<
bool()>& kill_function);
52 Group *create_group();
Audio sample containing many blocks.
Definition: smaudio.hh:80
Definition: sminstenccache.hh:43
Definition: sminstenccache.hh:17
Definition: smwavdata.hh:17
Definition: sminstrument.hh:106