Skip to content

Commit d097e7f

Browse files
committed
Dattorro: disable sample rate changability due to potential memory allocation
1 parent 934272a commit d097e7f

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

src/rvoice/fluid_rev_dattorro.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,6 @@ void fluid_revmodel_dattorro::set(int set, fluid_real_t roomsize, fluid_real_t d
329329

330330
int fluid_revmodel_dattorro::samplerate_change(fluid_real_t sample_rate)
331331
{
332-
if(sample_rate <= 0.0f)
333-
{
334-
return FLUID_FAILED;
335-
}
336-
337-
cached_sample_rate = sample_rate;
338-
setup();
339-
update();
340-
return FLUID_OK;
332+
FLUID_LOG(FLUID_ERR, "Dattorro reverb: sample rate change is not supported");
333+
return FLUID_FAILED;
341334
}

src/rvoice/fluid_rev_lexverb.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ static void fluid_lexverb_setup_blocks(fluid_revmodel_lexverb_t *rev)
4949
{
5050
int index = NUM_OF_AP_SECTS + i;
5151
int length = fluid_lexverb_ms_to_buf_length(LEX_REVERB_PARMS[index].length, rev->cached_sample_rate);
52-
FLUID_LOG(FLUID_DBG, "Lexverb delay line %d: default length = %d samples", i, length);
52+
FLUID_LOG(FLUID_DBG, "LEXverb delay line %d: default length = %d samples", i, length);
5353
length *= LEX_DELAY_SCALE;
5454
length++; // prevent zero length delay lines
55-
FLUID_LOG(FLUID_DBG, "Lexverb delay line %d: MAX length = %d samples", i, length);
55+
FLUID_LOG(FLUID_DBG, "LEXverb delay line %d: MAX length = %d samples", i, length);
5656

5757
rev->dl[i].set_coefficient(LEX_REVERB_PARMS[index].coef);
5858
rev->dl[i].set_buffer(length);
@@ -240,6 +240,6 @@ void fluid_revmodel_lexverb::set(int set, fluid_real_t roomsize, fluid_real_t da
240240

241241
int fluid_revmodel_lexverb::samplerate_change(fluid_real_t sample_rate)
242242
{
243-
FLUID_LOG(FLUID_ERR, "LEXverb reverb: sample rate change is not supported");
243+
FLUID_LOG(FLUID_ERR, "LEXverb: sample rate change is not supported");
244244
return FLUID_FAILED;
245245
}

0 commit comments

Comments
 (0)