This commit is contained in:
Johannes Findeisen 2026-10-28 17:16:01 +01:00
commit 02e27a33a2
47 changed files with 882 additions and 62 deletions

View file

@ -261,7 +261,7 @@ static xtc_result read_project(reader *input, xtc_project *project, const char *
if (!decode_bytes(input->tokens[1],p->path,sizeof(p->path))) return XTC_ERR_FORMAT;
if (format_version >= 11U) {
READ("FORMAT",3U); NUM(1U,value);
if (value > XTC_PLUGIN_VST3) return XTC_ERR_UNSUPPORTED;
if (value > (format_version >= 13U ? XTC_PLUGIN_BUILTIN : XTC_PLUGIN_VST3)) return XTC_ERR_UNSUPPORTED;
p->format = (xtc_plugin_format)value;
if (strcmp(input->tokens[2],"-") && !decode_bytes(input->tokens[2],p->identifier,sizeof(p->identifier))) return XTC_ERR_FORMAT;
}
@ -454,7 +454,7 @@ static xtc_result read_project(reader *input, xtc_project *project, const char *
for (slot = 0; slot < project->track_count && project->tracks[slot].id != track; ++slot) {}
if (slot == project->track_count || project->tracks[slot].is_bus || project->instruments[slot].instrument) return XTC_ERR_FORMAT;
s = project->instruments+slot; s->instrument = 1; s->tempo = project->tempo;
NUM(2U,value); if (value < XTC_PLUGIN_CLAP || value > XTC_PLUGIN_VST3) return XTC_ERR_UNSUPPORTED;
NUM(2U,value); if (value < XTC_PLUGIN_CLAP || value > (format_version >= 13U ? XTC_PLUGIN_BUILTIN : XTC_PLUGIN_VST3)) return XTC_ERR_UNSUPPORTED;
s->format = (xtc_plugin_format)value;
NUM(3U,value); if (value >= 1024) return XTC_ERR_FORMAT; s->index = (unsigned int)value;
NUM(4U,value); if (value > UINT32_MAX) return XTC_ERR_FORMAT; s->unique_id = (unsigned int)value;