Remove unused CubicInterpolation from session
authorRobin Gareus <robin@gareus.org>
Tue, 22 May 2018 21:27:47 +0000 (23:27 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 9 Jul 2018 15:30:38 +0000 (17:30 +0200)
libs/ardour/ardour/session.h
libs/ardour/session_process.cc
libs/ardour/session_state.cc

index 759901680c3ff8e037a1a67ff2910c28fbf93911..40cf8578ccec5754bfc17c171d1100788c9a8d89 100644 (file)
@@ -1256,14 +1256,13 @@ private:
        bool                    _silent;
        samplecnt_t             _remaining_latency_preroll;
 
-       // varispeed playback
+       // varispeed playback -- TODO: move out of session to backend.
        double                  _engine_speed;
-       double                  _transport_speed;
+       double                  _transport_speed; // only: -1, 0, +1
        double                  _default_transport_speed;
        double                  _last_transport_speed;
        double                  _signalled_varispeed;
        double                  _target_transport_speed;
-       CubicInterpolation       interpolation;
 
        bool                     auto_play_legal;
        samplepos_t             _last_slave_transport_sample;
index 9b26f9190c94471518d1466cdae0b03087f9a742..eeb8cb871e905cefaf6d654a3ee26a2d35979132 100644 (file)
@@ -871,12 +871,8 @@ Session::process_without_events (pframes_t nframes)
                return;
        }
 
-       if (_transport_speed == 1.0) {
-               samples_moved = (samplecnt_t) nframes;
-       } else {
-               interpolation.set_speed (_transport_speed);
-               samples_moved = interpolation.distance (nframes);
-       }
+       assert (_transport_speed == 1.f || _transport_speed == -1.f);
+       samples_moved = (samplecnt_t) nframes * _transport_speed;
 
        if (!_exporting && !timecode_transmission_suspended()) {
                send_midi_time_code_for_cycle (_transport_sample, _transport_sample + samples_moved, nframes);
index c278454843ca818e262bb1b450c82ada27a5d1a3..b27a292642a21db84a42b62b7461bb1ac959f2b0 100644 (file)
@@ -182,7 +182,6 @@ Session::pre_engine_init (string fullpath)
        g_atomic_int_set (&_capture_load, 100);
        set_next_event ();
        _all_route_group->set_active (true, this);
-       interpolation.add_channel ();
 
        if (config.get_use_video_sync()) {
                waiting_for_sync_offset = true;