summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-05-22 18:09:26 +0200
committerRobin Gareus <robin@gareus.org>2018-07-09 17:30:38 +0200
commit249640267cc9afa7b0f048d56b7e961af6441111 (patch)
treea51c99646a6409a4012987fd3e19b1f61eaf9389 /libs/ardour/ardour
parent8664768efa99c9186a99e2487581e0107d431833 (diff)
Remove global declick API
De-click will be per disk-reader, latency compensated and buffer-size independent. Cue-monitoring should not be affected by de-click.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/amp.h7
-rw-r--r--libs/ardour/ardour/auditioner.h6
-rw-r--r--libs/ardour/ardour/graph.h7
-rw-r--r--libs/ardour/ardour/route.h14
-rw-r--r--libs/ardour/ardour/session.h30
-rw-r--r--libs/ardour/ardour/track.h2
6 files changed, 10 insertions, 56 deletions
diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h
index ee06708b5f..36b5464692 100644
--- a/libs/ardour/ardour/amp.h
+++ b/libs/ardour/ardour/amp.h
@@ -32,9 +32,7 @@ class BufferSet;
class GainControl;
class IO;
-/** Applies a declick operation to all audio inputs, passing the same number of
- * audio outputs, and passing through any other types unchanged.
- */
+/** Gain Stage (Fader, Trim). */
class LIBARDOUR_API Amp : public Processor {
public:
Amp(Session& s, const std::string& display_name, boost::shared_ptr<GainControl> control, bool control_midi_also);
@@ -62,9 +60,6 @@ public:
static gain_t apply_gain (AudioBuffer& buf, samplecnt_t sample_rate, samplecnt_t nframes, gain_t initial, gain_t target, sampleoffset_t offset = 0);
static void apply_simple_gain (AudioBuffer& buf, samplecnt_t nframes, gain_t target, sampleoffset_t offset = 0);
- static void declick (BufferSet& bufs, samplecnt_t nframes, int dir);
- static void update_meters();
-
boost::shared_ptr<GainControl> gain_control() {
return _gain_control;
}
diff --git a/libs/ardour/ardour/auditioner.h b/libs/ardour/ardour/auditioner.h
index 3340430e48..af3a370e8c 100644
--- a/libs/ardour/ardour/auditioner.h
+++ b/libs/ardour/ardour/auditioner.h
@@ -70,11 +70,11 @@ class LIBARDOUR_API Auditioner : public Track
PBD::Signal2<void, ARDOUR::samplecnt_t, ARDOUR::samplecnt_t> AuditionProgress;
/* Track */
- int roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, int declick, bool& need_butler);
+ int roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
DataType data_type () const;
- int roll_audio (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, int declick, bool& need_butler);
- int roll_midi (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, int declick, bool& need_butler);
+ int roll_audio (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
+ int roll_midi (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
/* fake track */
void set_state_part_two () {}
diff --git a/libs/ardour/ardour/graph.h b/libs/ardour/ardour/graph.h
index 0dc8e164c4..e6eae0750d 100644
--- a/libs/ardour/ardour/graph.h
+++ b/libs/ardour/ardour/graph.h
@@ -65,11 +65,9 @@ public:
void helper_thread();
- int process_routes (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, int declick,
- bool& need_butler);
+ int process_routes (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
- int routes_no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample,
- bool non_rt_pending, int declick);
+ int routes_no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool non_rt_pending );
void process_one_route (Route * route);
@@ -125,7 +123,6 @@ private:
samplepos_t _process_end_sample;
bool _process_can_record;
bool _process_non_rt_pending;
- int _process_declick;
bool _process_noroll;
int _process_retval;
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index bfd894375b..bd283d27ac 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -142,7 +142,7 @@ public:
virtual void filter_input (BufferSet &) {}
- int roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, int declick, bool& need_butler);
+ int roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
int no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool state_changing);
@@ -154,7 +154,6 @@ public:
virtual void realtime_handle_transport_stopped () {}
virtual void realtime_locate () {}
virtual void non_realtime_locate (samplepos_t);
- virtual void set_pending_declick (int);
void set_loop (ARDOUR::Location *);
/* end of vfunc-based API */
@@ -586,8 +585,7 @@ public:
/* can only be executed by a route for which is_monitor() is true
* (i.e. the monitor out)
*/
- void monitor_run (samplepos_t start_sample, samplepos_t end_sample,
- pframes_t nframes, int declick);
+ void monitor_run (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes);
bool slaved_to (boost::shared_ptr<VCA>) const;
bool slaved () const;
@@ -611,7 +609,7 @@ protected:
void process_output_buffers (BufferSet& bufs,
samplepos_t start_sample, samplepos_t end_sample,
- pframes_t nframes, int declick,
+ pframes_t nframes,
bool gain_automation_ok,
bool run_disk_processors);
@@ -657,7 +655,6 @@ protected:
gint _pending_process_reorder; // atomic
gint _pending_signals; // atomic
- int _pending_declick;
MeterPoint _meter_point;
MeterPoint _pending_meter_point;
MeterType _meter_type;
@@ -665,7 +662,6 @@ protected:
bool _denormal_protection;
bool _recordable : 1;
- bool _declickable : 1;
boost::shared_ptr<SoloControl> _solo_control;
boost::shared_ptr<MuteControl> _mute_control;
@@ -695,8 +691,6 @@ protected:
uint32_t pans_required() const;
ChanCount n_process_buffers ();
- virtual void maybe_declick (BufferSet&, samplecnt_t, int);
-
boost::shared_ptr<GainControl> _gain_control;
boost::shared_ptr<GainControl> _trim_control;
boost::shared_ptr<PhaseControl> _phase_control;
@@ -752,7 +746,7 @@ private:
pframes_t latency_preroll (pframes_t nframes, samplepos_t& start_sample, samplepos_t& end_sample);
- void run_route (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, int declick, bool gain_automation_ok, bool run_disk_reader);
+ void run_route (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, bool gain_automation_ok, bool run_disk_reader);
void fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pframes_t nframes);
void reset_instrument_info ();
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 835e6668bc..6a0d85c3f6 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -175,12 +175,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
{
private:
enum SubState {
- PendingDeclickIn = 0x1, ///< pending de-click fade-in for start
- PendingDeclickOut = 0x2, ///< pending de-click fade-out for stop
- StopPendingCapture = 0x4,
PendingLoopDeclickIn = 0x8, ///< pending de-click fade-in at the start of a loop
PendingLoopDeclickOut = 0x10, ///< pending de-click fade-out at the end of a loop
- PendingLocate = 0x20,
};
public:
@@ -440,7 +436,6 @@ public:
bool global_locate_pending() const { return _global_locate_pending; }
bool locate_pending() const { return static_cast<bool>(post_transport_work()&PostTransportLocate); }
- bool declick_out_pending() const { return static_cast<bool>(transport_sub_state&(PendingDeclickOut)); }
bool transport_locked () const;
int wipe ();
@@ -1376,31 +1371,9 @@ private:
-1 if there is a pending declick fade-out,
0 if there is no pending declick.
*/
- int get_transport_declick_required () {
- if (transport_sub_state & PendingDeclickIn) {
- transport_sub_state &= ~PendingDeclickIn;
- return 1;
- } else if (transport_sub_state & PendingDeclickOut) {
- /* XXX: not entirely sure why we don't clear this */
- return -1;
- } else if (transport_sub_state & PendingLoopDeclickOut) {
- /* Return the declick out first ... */
- transport_sub_state &= ~PendingLoopDeclickOut;
- return -1;
- } else if (transport_sub_state & PendingLoopDeclickIn) {
- /* ... then the declick in on the next call */
- transport_sub_state &= ~PendingLoopDeclickIn;
- return 1;
- } else {
- return 0;
- }
- }
-
bool maybe_stop (samplepos_t limit);
bool maybe_sync_start (pframes_t &);
- void check_declick_out ();
-
std::string _path;
std::string _name;
bool _is_new;
@@ -1443,9 +1416,6 @@ private:
samplepos_t _last_roll_or_reversal_location;
samplepos_t _last_record_location;
- bool pending_locate_roll;
- samplepos_t pending_locate_sample;
- bool pending_locate_flush;
bool pending_abort;
bool pending_auto_loop;
diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h
index 7703221bd4..b1700fb382 100644
--- a/libs/ardour/ardour/track.h
+++ b/libs/ardour/ardour/track.h
@@ -209,8 +209,6 @@ protected:
XMLNode* pending_state;
bool _destructive;
- void maybe_declick (BufferSet&, samplecnt_t, int);
-
boost::shared_ptr<AutomationControl> _record_enable_control;
boost::shared_ptr<AutomationControl> _record_safe_control;