diff options
Diffstat (limited to 'plugins/dsp_libsrc')
-rw-r--r-- | plugins/dsp_libsrc/src.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/dsp_libsrc/src.c b/plugins/dsp_libsrc/src.c index 09e5897f..9c5e6fdc 100644 --- a/plugins/dsp_libsrc/src.c +++ b/plugins/dsp_libsrc/src.c @@ -87,7 +87,7 @@ ddb_src_set_ratio (ddb_dsp_context_t *_src, float ratio) { } int -ddb_src_process (ddb_dsp_context_t *_src, float *samples, int nframes, ddb_waveformat_t *fmt) { +ddb_src_process (ddb_dsp_context_t *_src, float *samples, int nframes, int maxframes, ddb_waveformat_t *fmt, float *r) { ddb_src_libsamplerate_t *src = (ddb_src_libsamplerate_t*)_src; if (fmt->samplerate == src->samplerate) { @@ -111,6 +111,9 @@ ddb_src_process (ddb_dsp_context_t *_src, float *samples, int nframes, ddb_wavef fmt->samplerate = src->samplerate; int numoutframes = nframes * src->srcdata.src_ratio; + if (numoutframes > maxframes) { + numoutframes = maxframes; + } float outbuf[numoutframes*fmt->channels]; memset (outbuf, 0, sizeof (outbuf)); int buffersize = sizeof (outbuf); |