- class LinearInterpolation : public Interpolation {
- protected:
- // the idea is that when the speed is not 1.0, we have to
- // interpolate between samples and then we have to store where we thought we were.
- // rather than being at sample N or N+1, we were at N+0.8792922
- std::vector<double> phase;
-
- public:
- void add_channel_to (int input_buffer_size, int output_buffer_size);
- void remove_channel_from ();
-
- nframes_t interpolate (int channel, nframes_t nframes, Sample* input, Sample* output);
- void reset ();
- };
-
-class LibSamplerateInterpolation : public Interpolation {
- protected:
- std::vector<SRC_STATE*> state;
- std::vector<SRC_DATA*> data;
-
- int error;
-
- void reset_state ();
-
- public:
- LibSamplerateInterpolation ();
- ~LibSamplerateInterpolation ();
-
- void set_speed (double new_speed);
- void set_target_speed (double new_speed) {}
- double speed () const { return _speed; }
-
- void add_channel_to (int input_buffer_size, int output_buffer_size);
- void remove_channel_from ();
-
- nframes_t interpolate (int channel, nframes_t nframes, Sample* input, Sample* output);
- void reset() { reset_state (); }
+class LIBARDOUR_API CubicInterpolation : public Interpolation {
+public:
+ framecnt_t interpolate (int channel, framecnt_t nframes, Sample* input, Sample* output);
+};
+
+class BufferSet;
+
+class LIBARDOUR_API CubicMidiInterpolation : public Interpolation {
+public:
+ framecnt_t distance (framecnt_t nframes, bool roll = true);