Exemple #1
0
File LoadSave::loadPatch(int bank_index, int folder_index, int patch_index,
                         SynthBase* synth, std::map<std::string, String>& save_info) {
  File patch = getPatchFile(bank_index, folder_index, patch_index);

  var parsed_json_state;
  if (JSON::parse(patch.loadFileAsString(), parsed_json_state).wasOk())
    varToState(synth, save_info, parsed_json_state);

  return patch;
}
Exemple #2
0
File LoadSave::loadPatch(int bank_index, int folder_index, int patch_index,
                         mopo::HelmEngine* synth, std::map<std::string, String>& gui_state,
                         const CriticalSection& critical_section) {
    File patch = getPatchFile(bank_index, folder_index, patch_index);

    var parsed_json_state;
    if (JSON::parse(patch.loadFileAsString(), parsed_json_state).wasOk())
        varToState(synth, gui_state, critical_section, parsed_json_state);

    return patch;
}