Remove believed-unnecessary and broken MIDI thru option;
authorCarl Hetherington <carl@carlh.net>
Sun, 17 Jun 2012 14:28:10 +0000 (14:28 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 17 Jun 2012 14:28:10 +0000 (14:28 +0000)
should fix #4749.

git-svn-id: svn://localhost/ardour2/branches/3.0@12746 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/midi_time_axis.cc
gtk2_ardour/midi_time_axis.h
libs/ardour/ardour/midi_track.h
libs/ardour/midi_track.cc
libs/ardour/track.cc

index f182c301d6ce7f481df2143ad08b337cd25282da..9a4200b4af9cf39020ba8acf6365fe6c4632b3d6 100644 (file)
@@ -113,7 +113,6 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess, Canvas& can
        , _channel_color_mode_item(0)
        , _track_color_mode_item(0)
        , _step_edit_item (0)
-       , _midi_thru_item (0)
        , controller_menu (0)
         , _step_editor (0)
 {
@@ -405,25 +404,9 @@ MidiTimeAxisView::append_extra_display_menu_items ()
        items.push_back (MenuElem (_("Note Range"), *range_menu));
        items.push_back (MenuElem (_("Note Mode"), *build_note_mode_menu()));
 
-       items.push_back (CheckMenuElem (_("MIDI Thru"), sigc::mem_fun(*this, &MidiTimeAxisView::toggle_midi_thru)));
-       _midi_thru_item = dynamic_cast<CheckMenuItem*>(&items.back());
-
        items.push_back (SeparatorElem ());
 }
 
-void
-MidiTimeAxisView::toggle_midi_thru ()
-{
-       if (!_midi_thru_item) {
-               return;
-       }
-
-       bool view_yn = _midi_thru_item->get_active();
-       if (view_yn != midi_track()->midi_thru()) {
-               midi_track()->set_midi_thru (view_yn);
-       }
-}
-
 void
 MidiTimeAxisView::build_automation_action_menu (bool for_selection)
 {
index 4da89df1095f3fd5d8d75454f4fa0e3a9098a657..87619799478f1f16a9d49f969b78c8a4650987c2 100644 (file)
@@ -136,11 +136,8 @@ class MidiTimeAxisView : public RouteTimeAxisView
        Gtk::ComboBoxText            _custom_device_mode_selector;
 
        Gtk::CheckMenuItem*          _step_edit_item;
-       Gtk::CheckMenuItem*          _midi_thru_item;
        Gtk::Menu*                    default_channel_menu;
 
-       void toggle_midi_thru ();
-
        void change_all_channel_tracks_visibility (bool yn, Evoral::Parameter param);
        void add_basic_parameter_menu_item (Gtk::Menu_Helpers::MenuList& items, const std::string& label, Evoral::Parameter param);
        void add_channel_command_menu_item (Gtk::Menu_Helpers::MenuList& items, const std::string& label, ARDOUR::AutomationType auto_type, uint8_t cmd);
index bb810ff74a22a49d09ab17863868b5fa27978d36..934c1862b0ea41e2c21590b429a351b20b8532f6 100644 (file)
@@ -92,9 +92,6 @@ public:
 
        PBD::Signal1<void,bool> StepEditStatusChange;
 
-       bool midi_thru() const { return _midi_thru; }
-       void set_midi_thru (bool yn);
-
        boost::shared_ptr<SMFSource> write_source (uint32_t n = 0);
        void set_channel_mode (ChannelMode, uint16_t);
        ChannelMode get_channel_mode ();
@@ -116,7 +113,7 @@ protected:
 
        void act_on_mute ();
 
-  private:
+private:
 
        virtual boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &);
        
@@ -131,7 +128,6 @@ protected:
        MidiRingBuffer<framepos_t> _step_edit_ring_buffer;
        NoteMode                  _note_mode;
        bool                      _step_editing;
-       bool                      _midi_thru;
        bool                      _input_active;
 
        int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool state_changing);
index 64e61e79f9f6406d2af8f7ed9cef628884a87c41..8847bf13bcbff96b35369960c479b7ffd319aa99 100644 (file)
@@ -54,7 +54,6 @@ MidiTrack::MidiTrack (Session& sess, string name, Route::Flag flag, TrackMode mo
        , _step_edit_ring_buffer(64) // FIXME: size?
        , _note_mode(Sustained)
        , _step_editing (false)
-       , _midi_thru (true)
        , _input_active (true)
 {
 }
@@ -155,10 +154,6 @@ MidiTrack::set_state (const XMLNode& node, int version)
        // No destructive MIDI tracks (yet?)
        _mode = Normal;
 
-       if ((prop = node.property ("midi-thru")) != 0) {
-               set_midi_thru (string_is_affirmative (prop->value()));
-       }
-
        if ((prop = node.property ("input-active")) != 0) {
                set_input_active (string_is_affirmative (prop->value()));
        }
@@ -205,7 +200,6 @@ MidiTrack::state(bool full_state)
 
        root.add_property ("step-editing", (_step_editing ? "yes" : "no"));
        root.add_property ("note-mode", enum_2_string (_note_mode));
-       root.add_property ("midi-thru", (_midi_thru ? "yes" : "no"));
        root.add_property ("input-active", (_input_active ? "yes" : "no"));
 
        return root;
@@ -477,11 +471,6 @@ MidiTrack::write_out_of_band_data (BufferSet& bufs, framepos_t /*start*/, framep
 
                _immediate_events.read (buf, 0, 1, nframes-1, true);
        }
-
-       // MIDI thru: send incoming data "through" output
-       if (_midi_thru && _session.transport_speed() != 0.0f && _input->n_ports().n_midi()) {
-               buf.merge_in_place (_input->midi(0)->get_midi_buffer(nframes));
-       }
 }
 
 int
@@ -625,12 +614,6 @@ MidiTrack::set_step_editing (bool yn)
        }
 }
 
-void
-MidiTrack::set_midi_thru (bool yn)
-{
-       _midi_thru = yn;
-}
-
 boost::shared_ptr<SMFSource>
 MidiTrack::write_source (uint32_t)
 {
index 0ad59d1b31b93db50340e3a095044a5a9def0cea..1c45460088fbed95017f22db01c869e105b1c5a0 100644 (file)
@@ -406,7 +406,7 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
                */
                 be_silent = (s == MonitoringSilence || s == MonitoringDisk);
        }
-
+       
        if (!_have_internal_generator && metering_state() == MeteringInput) {
                _input->process_input (_meter, start_frame, end_frame, nframes);
        }