Relax fluidsynth's sample-rate constraint

Allow for 192kHz session (needs testing, by ear and
by down-sampling to 48k vs. running directly at 48k, etc)
Also prevent plugin from loading when sample-rate is out of bounds.

Previously the plugin loaded but was pitched up when the sample
rate exceeded 96k.
This commit is contained in:
Robin Gareus
2026-01-13 15:00:17 +01:00
parent 54e45ad50c
commit 2a395aead5
3 changed files with 30 additions and 2 deletions

View File

@@ -416,6 +416,12 @@ instantiate (const LV2_Descriptor* descriptor,
return NULL;
}
if (rate < 8000 || rate > 192000) {
lv2_log_error (&self->logger, "a-fluidsynth.lv2: Sample-rate is out of bounds. Valid range is 8kHz - 192kHz.\n");
free (self);
return NULL;
}
if (!self->schedule) {
lv2_log_error (&self->logger, "a-fluidsynth.lv2: Host does not support worker:schedule\n");
free (self);