From 87d57a1de9125e9b2c2e0c46178906edaf7c122a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 18 Sep 2011 19:49:26 +0000 Subject: Remove unused rec_monitors_input variables. git-svn-id: svn://localhost/ardour2/branches/3.0@10091 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/audio_diskstream.h | 4 ++-- libs/ardour/ardour/audio_track.h | 2 +- libs/ardour/ardour/diskstream.h | 2 +- libs/ardour/ardour/graph.h | 5 ++--- libs/ardour/ardour/midi_diskstream.h | 4 ++-- libs/ardour/ardour/midi_track.h | 2 +- libs/ardour/ardour/route.h | 4 ++-- libs/ardour/ardour/session.h | 12 ------------ libs/ardour/ardour/track.h | 4 ++-- libs/ardour/audio_diskstream.cc | 10 +++++----- libs/ardour/audio_track.cc | 6 +++--- libs/ardour/auditioner.cc | 2 +- libs/ardour/graph.cc | 10 ++++------ libs/ardour/midi_diskstream.cc | 10 +++++----- libs/ardour/midi_track.cc | 6 +++--- libs/ardour/route.cc | 4 ++-- libs/ardour/session_process.cc | 10 ++++------ libs/ardour/track.cc | 4 ++-- 18 files changed, 42 insertions(+), 59 deletions(-) (limited to 'libs') diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index e37963a07a..f233e21112 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -171,7 +171,7 @@ class AudioDiskstream : public Diskstream protected: friend class AudioTrack; - int process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler); + int process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool& need_butler); bool commit (framecnt_t nframes); private: @@ -237,7 +237,7 @@ class AudioDiskstream : public Diskstream framepos_t& start, framecnt_t cnt, ChannelInfo* channel_info, int channel, bool reversed); - void finish_capture (bool rec_monitors_input, boost::shared_ptr); + void finish_capture (boost::shared_ptr); void transport_stopped_wallclock (struct tm&, time_t, bool abort); void transport_looped (framepos_t transport_frame); diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h index 7a2c50099f..445558ccdd 100644 --- a/libs/ardour/ardour/audio_track.h +++ b/libs/ardour/ardour/audio_track.h @@ -40,7 +40,7 @@ class AudioTrack : public Track bool can_use_mode (TrackMode m, bool& bounce_required); int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, - int declick, bool can_record, bool rec_monitors_input, bool& need_butler); + int declick, bool can_record, bool& need_butler); void use_new_diskstream (); void set_diskstream (boost::shared_ptr); diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index 808ad38625..dad9501c8e 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -185,7 +185,7 @@ class Diskstream : public SessionObject, public PublicDiskstream protected: friend class Track; - virtual int process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler) = 0; + virtual int process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool& need_butler) = 0; virtual bool commit (framecnt_t nframes) = 0; //private: diff --git a/libs/ardour/ardour/graph.h b/libs/ardour/ardour/graph.h index e3363a0353..0279fe8fd9 100644 --- a/libs/ardour/ardour/graph.h +++ b/libs/ardour/ardour/graph.h @@ -74,10 +74,10 @@ public: void main_thread(); int silent_process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, - bool can_record, bool rec_monitors_input, bool& need_butler); + bool can_record, bool& need_butler); int process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, - bool can_record, bool rec_monitors_input, bool& need_butler); + bool can_record, bool& need_butler); int routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool non_rt_pending, bool can_record, int declick); @@ -131,7 +131,6 @@ private: framepos_t _process_start_frame; framepos_t _process_end_frame; bool _process_can_record; - bool _process_rec_monitors_input; bool _process_non_rt_pending; int _process_declick; diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h index b7f3de3887..d10640b51b 100644 --- a/libs/ardour/ardour/midi_diskstream.h +++ b/libs/ardour/ardour/midi_diskstream.h @@ -142,7 +142,7 @@ class MidiDiskstream : public Diskstream protected: friend class MidiTrack; - int process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler); + int process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool& need_butler); bool commit (framecnt_t nframes); static framecnt_t midi_readahead; @@ -156,7 +156,7 @@ class MidiDiskstream : public Diskstream int read (framepos_t& start, framecnt_t cnt, bool reversed); - void finish_capture (bool rec_monitors_input); + void finish_capture (); void transport_stopped_wallclock (struct tm&, time_t, bool abort); void transport_looped (framepos_t transport_frame); diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index ab8f045faa..407a317433 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -42,7 +42,7 @@ public: int init (); int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, - int declick, bool can_record, bool rec_monitors_input, bool& need_butler); + int declick, bool can_record, bool& need_butler); void realtime_handle_transport_stopped (); void realtime_locate (); diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 1d8c39a21e..34ecffa29c 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -109,13 +109,13 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, /* these are the core of the API of a Route. see the protected sections as well */ virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, - int declick, bool can_record, bool rec_monitors_input, bool& need_butler); + int declick, bool can_record, bool& need_butler); virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool state_changing, bool can_record); virtual int silent_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, - bool can_record, bool rec_monitors_input, bool& need_butler); + bool can_record, bool& need_butler); virtual void toggle_monitor_input (); virtual bool can_record() { return false; } diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index cafcd4382f..68cf66bd25 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -963,18 +963,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi int process_routes (pframes_t, bool& need_butler); int silent_process_routes (pframes_t, bool& need_butler); - bool get_rec_monitors_input () { - if (actively_recording()) { - return true; - } else { - if (config.get_auto_input()) { - return false; - } else { - return true; - } - } - } - int get_transport_declick_required () { if (transport_sub_state & PendingDeclickIn) { transport_sub_state &= ~PendingDeclickIn; diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index b58b5a3b77..d245977978 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -52,10 +52,10 @@ class Track : public Route, public PublicDiskstream bool state_changing, bool can_record); int silent_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, - bool can_record, bool rec_monitors_input, bool& need_butler); + bool can_record, bool& need_butler); virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, - int declick, bool can_record, bool rec_monitors_input, bool& need_butler) = 0; + int declick, bool can_record, bool& need_butler) = 0; bool needs_butler() const { return _needs_butler; } void toggle_monitor_input (); diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 878fa94b5e..81fb700d3c 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -405,7 +405,7 @@ AudioDiskstream::prepare_record_status(framepos_t capture_start_frame) } int -AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler) +AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool& need_butler) { uint32_t n; boost::shared_ptr c = channels.reader(); @@ -520,7 +520,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool ca } else { if (was_recording) { - finish_capture (rec_monitors_input, c); + finish_capture (c); } } @@ -1349,7 +1349,7 @@ AudioDiskstream::transport_stopped_wallclock (struct tm& when, time_t twhen, boo uint32_t n = 0; bool mark_write_completed = false; - finish_capture (true, c); + finish_capture (c); /* butler is already stopped, but there may be work to do to flush remaining data to disk. @@ -1548,7 +1548,7 @@ AudioDiskstream::transport_looped (framepos_t transport_frame) } } - finish_capture (true, c); + finish_capture (c); // the next region will start recording via the normal mechanism // we'll set the start position to the current transport pos @@ -1581,7 +1581,7 @@ AudioDiskstream::transport_looped (framepos_t transport_frame) } void -AudioDiskstream::finish_capture (bool /*rec_monitors_input*/, boost::shared_ptr c) +AudioDiskstream::finish_capture (boost::shared_ptr c) { was_recording = false; first_recordable_frame = max_framepos; diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index aa7768a228..14870cb72d 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -354,7 +354,7 @@ AudioTrack::set_state_part_two () int AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, - bool can_record, bool rec_monitors_input, bool& need_butler) + bool can_record, bool& need_butler) { Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); if (!lm.locked()) { @@ -386,13 +386,13 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram playback distance to zero, thus causing diskstream::commit to do nothing. */ - return diskstream->process (transport_frame, 0, can_record, rec_monitors_input, need_butler); + return diskstream->process (transport_frame, 0, can_record, need_butler); } _silent = false; _amp->apply_gain_automation(false); - if ((dret = diskstream->process (transport_frame, nframes, can_record, rec_monitors_input, need_butler)) != 0) { + if ((dret = diskstream->process (transport_frame, nframes, can_record, need_butler)) != 0) { silence (nframes); return dret; } diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index bdcd232106..b6544bbae6 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -223,7 +223,7 @@ Auditioner::play_audition (framecnt_t nframes) this_nframes = min (nframes, length - current_frame); - if ((ret = roll (this_nframes, current_frame, current_frame + nframes, false, false, false, need_butler)) != 0) { + if ((ret = roll (this_nframes, current_frame, current_frame + nframes, false, false, need_butler)) != 0) { silence (nframes); return ret; } diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc index 4656a5255e..f0d3075b30 100644 --- a/libs/ardour/graph.cc +++ b/libs/ardour/graph.cc @@ -513,13 +513,12 @@ Graph::dump (int chain) int Graph::silent_process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, - bool can_record, bool rec_monitors_input, bool& need_butler) + bool can_record, bool& need_butler) { _process_nframes = nframes; _process_start_frame = start_frame; _process_end_frame = end_frame; _process_can_record = can_record; - _process_rec_monitors_input = rec_monitors_input; _process_silent = true; _process_noroll = false; @@ -539,7 +538,7 @@ Graph::silent_process_routes (pframes_t nframes, framepos_t start_frame, framepo int Graph::process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, - bool can_record, bool rec_monitors_input, bool& need_butler) + bool can_record, bool& need_butler) { DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes)); @@ -547,7 +546,6 @@ Graph::process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end _process_start_frame = start_frame; _process_end_frame = end_frame; _process_can_record = can_record; - _process_rec_monitors_input = rec_monitors_input; _process_declick = declick; _process_silent = false; @@ -601,13 +599,13 @@ Graph::process_one_route (Route* route) DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 runs route %2\n", pthread_self(), route->name())); if (_process_silent) { - retval = route->silent_roll (_process_nframes, _process_start_frame, _process_end_frame, _process_can_record, _process_rec_monitors_input, need_butler); + retval = route->silent_roll (_process_nframes, _process_start_frame, _process_end_frame, _process_can_record, need_butler); } else if (_process_noroll) { route->set_pending_declick (_process_declick); retval = route->no_roll (_process_nframes, _process_start_frame, _process_end_frame, _process_non_rt_pending, _process_can_record); } else { route->set_pending_declick (_process_declick); - retval = route->roll (_process_nframes, _process_start_frame, _process_end_frame, _process_declick, _process_can_record, _process_rec_monitors_input, need_butler); + retval = route->roll (_process_nframes, _process_start_frame, _process_end_frame, _process_declick, _process_can_record, need_butler); } if (retval) { diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index beb3e1a76e..bf5be343e2 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -475,7 +475,7 @@ trace_midi (ostream& o, MIDI::byte *msg, size_t len) #endif int -MidiDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler) +MidiDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can_record, bool& need_butler) { int ret = -1; framecnt_t rec_offset = 0; @@ -563,7 +563,7 @@ MidiDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can } else { if (was_recording) { - finish_capture (rec_monitors_input); + finish_capture (); } } @@ -923,7 +923,7 @@ MidiDiskstream::transport_stopped_wallclock (struct tm& /*when*/, time_t /*twhen MidiRegion::SourceList::iterator src; vector::iterator ci; - finish_capture (true); + finish_capture (); /* butler is already stopped, but there may be work to do to flush remaining data to disk. @@ -1124,7 +1124,7 @@ MidiDiskstream::transport_looped (framepos_t transport_frame) } } - finish_capture (true); + finish_capture (); // the next region will start recording via the normal mechanism // we'll set the start position to the current transport pos @@ -1137,7 +1137,7 @@ MidiDiskstream::transport_looped (framepos_t transport_frame) } void -MidiDiskstream::finish_capture (bool /*rec_monitors_input*/) +MidiDiskstream::finish_capture () { was_recording = false; diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index bf1cd363dc..f42181b458 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -311,7 +311,7 @@ MidiTrack::set_state_part_two () int MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, - bool can_record, bool rec_monitors_input, bool& needs_butler) + bool can_record, bool& needs_butler) { Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); if (!lm.locked()) { @@ -339,12 +339,12 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame playback distance to zero, thus causing diskstream::commit to do nothing. */ - return diskstream->process (transport_frame, 0, can_record, rec_monitors_input, needs_butler); + return diskstream->process (transport_frame, 0, can_record, needs_butler); } _silent = false; - if ((dret = diskstream->process (transport_frame, nframes, can_record, rec_monitors_input, needs_butler)) != 0) { + if ((dret = diskstream->process (transport_frame, nframes, can_record, needs_butler)) != 0) { silence (nframes); return dret; } diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 6ee40103f1..06ca70c9e9 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2837,7 +2837,7 @@ Route::check_initial_delay (framecnt_t nframes, framecnt_t& transport_frame) int Route::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, - bool /*can_record*/, bool /*rec_monitors_input*/, bool& /* need_butler */) + bool /*can_record*/, bool& /* need_butler */) { Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); if (!lm.locked()) { @@ -2870,7 +2870,7 @@ Route::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, in int Route::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /*end_frame*/, - bool /*can_record*/, bool /*rec_monitors_input*/, bool& /* need_butler */) + bool /*can_record*/, bool& /* need_butler */) { silence (nframes); return 0; diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index f0d2bcaa84..947bceac9d 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -136,7 +136,6 @@ Session::process_routes (pframes_t nframes, bool& need_butler) { bool record_active; int declick = get_transport_declick_required(); - bool rec_monitors = get_rec_monitors_input(); boost::shared_ptr r = routes.reader (); if (transport_sub_state & StopPendingCapture) { @@ -155,7 +154,7 @@ Session::process_routes (pframes_t nframes, bool& need_butler) */ if (1 || route_graph->threads_in_use() > 0) { DEBUG_TRACE(DEBUG::ProcessThreads,"calling graph/process-routes\n"); - route_graph->process_routes( nframes, start_frame, end_frame, declick, record_active, rec_monitors, need_butler); + route_graph->process_routes (nframes, start_frame, end_frame, declick, record_active, need_butler); } else { for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { @@ -168,7 +167,7 @@ Session::process_routes (pframes_t nframes, bool& need_butler) (*i)->set_pending_declick (declick); - if ((ret = (*i)->roll (nframes, start_frame, end_frame, declick, record_active, rec_monitors, need_butler)) < 0) { + if ((ret = (*i)->roll (nframes, start_frame, end_frame, declick, record_active, need_butler)) < 0) { stop_transport (); return -1; } @@ -182,7 +181,6 @@ int Session::silent_process_routes (pframes_t nframes, bool& need_butler) { bool record_active = actively_recording(); - bool rec_monitors = get_rec_monitors_input(); boost::shared_ptr r = routes.reader (); const framepos_t start_frame = _transport_frame; @@ -193,7 +191,7 @@ Session::silent_process_routes (pframes_t nframes, bool& need_butler) tracks, the graph never gets updated. */ if (1 || route_graph->threads_in_use() > 0) { - route_graph->silent_process_routes( nframes, start_frame, end_frame, record_active, rec_monitors, need_butler); + route_graph->silent_process_routes (nframes, start_frame, end_frame, record_active, need_butler); } else { for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { @@ -203,7 +201,7 @@ Session::silent_process_routes (pframes_t nframes, bool& need_butler) continue; } - if ((ret = (*i)->silent_roll (nframes, start_frame, end_frame, record_active, rec_monitors, need_butler)) < 0) { + if ((ret = (*i)->silent_roll (nframes, start_frame, end_frame, record_active, need_butler)) < 0) { stop_transport (); return -1; } diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index ade0871eb3..6cbcc08714 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -285,7 +285,7 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int Track::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /*end_frame*/, - bool can_record, bool rec_monitors_input, bool& need_butler) + bool can_record, bool& need_butler) { Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); if (!lm.locked()) { @@ -306,7 +306,7 @@ Track::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /* silence (nframes); - return _diskstream->process (_session.transport_frame(), nframes, can_record, rec_monitors_input, need_butler); + return _diskstream->process (_session.transport_frame(), nframes, can_record, need_butler); } void -- cgit v1.2.3