コード例 #1
0
ファイル: load_save.cpp プロジェクト: and3k5/helm
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;
}
コード例 #2
0
ファイル: load_save.cpp プロジェクト: rpazyaquian/helm
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;
}