From 1927e4673b313eef550decdf1a6aeaa83937eec0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 22 Jul 2021 18:05:11 -0600 Subject: [PATCH] remove StepSequencer, BeatBox and BeatBoxGUI from wscripts and #ifdef code occurences. Files remain --- gtk2_ardour/beatbox_gui.cc | 2 ++ gtk2_ardour/processor_box.cc | 21 ++++++++++++++++++--- gtk2_ardour/processor_box.h | 2 ++ gtk2_ardour/wscript | 2 +- libs/ardour/ardour/route.h | 3 ++- libs/ardour/midi_track.cc | 4 ++++ libs/ardour/route.cc | 10 ++++++++-- libs/ardour/wscript | 4 ++-- libs/temporal/temporal/beats.h | 1 + 9 files changed, 40 insertions(+), 9 deletions(-) diff --git a/gtk2_ardour/beatbox_gui.cc b/gtk2_ardour/beatbox_gui.cc index 4bb28264d0..b0edcecd1e 100644 --- a/gtk2_ardour/beatbox_gui.cc +++ b/gtk2_ardour/beatbox_gui.cc @@ -25,7 +25,9 @@ #include "pbd/compose.h" #include "pbd/i18n.h" +#ifdef HAVE_BEATBOX #include "ardour/beatbox.h" +#endif #include "ardour/parameter_descriptor.h" #include "ardour/session.h" #include "ardour/smf_source.h" diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 4cf19a4715..aad13868bb 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -56,7 +56,9 @@ #include "ardour/amp.h" #include "ardour/audio_track.h" #include "ardour/audioengine.h" +#ifdef HAVE_BEATBOX #include "ardour/beatbox.h" +#endif #include "ardour/internal_return.h" #include "ardour/internal_send.h" #include "ardour/luaproc.h" @@ -2938,11 +2940,12 @@ ProcessorBox::maybe_add_processor_to_ui_list (boost::weak_ptr w) have_ui = true; } } +#ifdef HAVE_BEATBOX else if (boost::dynamic_pointer_cast (p)) { cerr << "Have UI for beatbox\n"; have_ui = true; } - +#endif if (!have_ui) { return; } @@ -3011,12 +3014,18 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr p) boost::shared_ptr send = boost::dynamic_pointer_cast (processor); boost::shared_ptr ext = boost::dynamic_pointer_cast (processor); +#ifdef HAVE_BEATBOX boost::shared_ptr bb = boost::dynamic_pointer_cast (processor); +#endif boost::shared_ptr stub = boost::dynamic_pointer_cast (processor); //faders and meters are not deletable, copy/paste-able, so they shouldn't be selectable +#ifdef HAVE_BEATBOX if (!send && !plugin_insert && !ext && !stub && !bb) { +#else + if (!send && !plugin_insert && !ext && !stub) { +#endif e->set_selectable(false); } @@ -3778,8 +3787,10 @@ ProcessorBox::processor_can_be_edited (boost::shared_ptr processor) if (boost::dynamic_pointer_cast (processor) || boost::dynamic_pointer_cast (processor) || boost::dynamic_pointer_cast (processor) || - boost::dynamic_pointer_cast (processor) || - boost::dynamic_pointer_cast (processor) + boost::dynamic_pointer_cast (processor) +#ifdef HAVE_BEATBOX + || boost::dynamic_pointer_cast (processor) +#endif ) { return true; } @@ -3807,7 +3818,9 @@ ProcessorBox::get_editor_window (boost::shared_ptr processor, bool us boost::shared_ptr retrn; boost::shared_ptr plugin_insert; boost::shared_ptr port_insert; +#ifdef HAVE_BEATBOX boost::shared_ptr beatbox; +#endif Window* gidget = 0; /* This method may or may not return a Window, but if it does not it @@ -3913,6 +3926,7 @@ ProcessorBox::get_editor_window (boost::shared_ptr processor, bool us gidget = io_selector; +#ifdef HAVE_BEATBOX } else if ((beatbox = boost::dynamic_pointer_cast (processor)) != 0) { Window* w = get_processor_ui (beatbox); @@ -3926,6 +3940,7 @@ ProcessorBox::get_editor_window (boost::shared_ptr processor, bool us } gidget = bbg; +#endif } return gidget; diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index fb568a5c66..0c408c1c04 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -57,7 +57,9 @@ #include "widgets/ardour_fader.h" #include "widgets/slider_controller.h" +#ifdef HAVE_BEATBOX #include "beatbox_gui.h" +#endif #include "plugin_interest.h" #include "plugin_display.h" #include "io_selector.h" diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index ecc32d3465..f9491f686a 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -60,7 +60,7 @@ gtk2_ardour_sources = [ 'automation_streamview.cc', 'automation_time_axis.cc', 'axis_view.cc', - 'beatbox_gui.cc', + # 'beatbox_gui.cc', 'bbt_marker_dialog.cc', 'big_clock_window.cc', 'big_transport_window.cc', diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 95ae213d94..9fd1630d1e 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -641,8 +641,9 @@ protected: boost::shared_ptr _pannable; boost::shared_ptr _disk_reader; boost::shared_ptr _disk_writer; +#ifdef HAVE_BEATBOX boost::shared_ptr _beatbox; - +#endif boost::shared_ptr _monitoring_control; DiskIOPoint _disk_io_point; diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 9db871e06b..7ca6e9d796 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -40,7 +40,9 @@ #include "evoral/midi_util.h" #include "ardour/amp.h" +#ifdef HAVE_BEATBOX #include "ardour/beatbox.h" +#endif #include "ardour/buffer_set.h" #include "ardour/debug.h" #include "ardour/delivery.h" @@ -110,8 +112,10 @@ MidiTrack::init () _disk_writer->DataRecorded.connect_same_thread (*this, boost::bind (&MidiTrack::data_recorded, this, _1)); +#ifdef HAVE_BEATBOX _beatbox.reset (new BeatBox (_session)); add_processor (_beatbox, PostFader); +#endif return 0; } diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 2f2a24ceca..ab3aac3894 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -52,7 +52,9 @@ #include "ardour/audio_track.h" #include "ardour/audio_port.h" #include "ardour/audioengine.h" +#ifdef HAVE_BEATBOX #include "ardour/beatbox.h" +#endif #include "ardour/boost_debug.h" #include "ardour/buffer.h" #include "ardour/buffer_set.h" @@ -3083,9 +3085,11 @@ Route::set_processor_state (const XMLNode& node, int version) assert (is_master ()); _volume->set_state (**niter, version); new_order.push_back (_volume); +#ifdef HAVE_BEATBOX } else if (prop->value() == "beatbox" && _beatbox) { _beatbox->set_state (**niter, Stateful::current_state_version); new_order.push_back (_beatbox); +#endif } else if (prop->value() == "meter") { _meter->set_state (**niter, version); new_order.push_back (_meter); @@ -5016,11 +5020,12 @@ Route::setup_invisible_processors () for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { boost::shared_ptr auxsnd = boost::dynamic_pointer_cast ((*i)); +#ifdef HAVE_BEATBOX /* XXX temporary hack while we decide on visibility */ if (boost::dynamic_pointer_cast (*i)) { continue; } - +#endif if ((*i)->display_to_user ()) { new_processors.push_back (*i); } @@ -5130,6 +5135,7 @@ Route::setup_invisible_processors () trim = new_processors.begin(); } +#ifdef HAVE_BEATBOX /* BEATBOX (for MIDI) */ if (_beatbox) { @@ -5137,7 +5143,7 @@ Route::setup_invisible_processors () ++insert_pos; new_processors.insert (insert_pos, _beatbox); } - +#endif /* INTERNAL RETURN */ /* doing this here means that any monitor control will come after diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 826082745d..b0d96539e9 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -46,7 +46,7 @@ libardour_sources = [ 'automation_control.cc', 'automation_list.cc', 'automation_watch.cc', - 'beatbox.cc', + # 'beatbox.cc', 'broadcast_info.cc', 'buffer.cc', 'buffer_manager.cc', @@ -247,7 +247,7 @@ libardour_sources = [ 'speakers.cc', 'srcfilesource.cc', 'stripable.cc', - 'step_sequencer.cc', + # 'step_sequencer.cc', 'strip_silence.cc', 'system_exec.cc', 'revision.cc', diff --git a/libs/temporal/temporal/beats.h b/libs/temporal/temporal/beats.h index f9a4477343..b22e0c92e3 100644 --- a/libs/temporal/temporal/beats.h +++ b/libs/temporal/temporal/beats.h @@ -256,6 +256,7 @@ public: _beats = B._beats; _ticks = B._ticks; return *this; + } Beats operator/ (Beats const & other) const { return Beats::ticks (int_div_round (to_ticks(), other.to_ticks()));