From f5c5adee6aa82514500366f75f1f53aaf317c064 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 31 Oct 2017 22:01:04 +0100 Subject: Interpolation phase[] is initially empty --- libs/ardour/interpolation.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/ardour/interpolation.cc') diff --git a/libs/ardour/interpolation.cc b/libs/ardour/interpolation.cc index c29a62232b..3ba9253dee 100644 --- a/libs/ardour/interpolation.cc +++ b/libs/ardour/interpolation.cc @@ -41,6 +41,7 @@ CubicInterpolation::interpolate (int channel, samplecnt_t input_samples, Sample assert (output_samples > 0); assert (input); assert (output); + assert (phase.size () > channel); _speed = fabs (_speed); @@ -221,5 +222,6 @@ CubicInterpolation::reset () samplecnt_t CubicInterpolation::distance (samplecnt_t nsamples) { + assert (phase.size () > 0); return floor (floor (phase[0]) + (_speed * nsamples)); } -- cgit v1.2.3