From c685724c8067fc9308c5f66f1b91d445509159e9 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 24 Jul 2010 16:40:56 +0000 Subject: step editing now accessed via a context menu on MIDI track rec-enable buttons. along the way, fixed up confusion between set_rec_enable() and set_rec_enabled() methods in Route/Track/Diskstream git-svn-id: svn://localhost/ardour2/branches/3.0@7482 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/midi_track.h | 5 ++++- libs/ardour/ardour/public_diskstream.h | 1 - libs/ardour/ardour/route.h | 2 +- libs/ardour/ardour/session.h | 12 ++++++++++-- libs/ardour/ardour/track.h | 3 +-- 5 files changed, 16 insertions(+), 7 deletions(-) (limited to 'libs/ardour/ardour') diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index 42446da70d..df1d2e11df 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -46,6 +46,7 @@ public: void use_new_diskstream (); void set_diskstream (boost::shared_ptr); + void set_record_enabled (bool yn, void *src); void set_latency_delay (nframes_t); @@ -83,6 +84,8 @@ public: void set_step_editing (bool yn); MidiRingBuffer& step_edit_ring_buffer() { return _step_edit_ring_buffer; } + static PBD::Signal1 StepEditStatusChange; + uint8_t default_channel() const { return _default_channel; } void set_default_channel (uint8_t chn); @@ -94,7 +97,7 @@ public: ChannelMode get_channel_mode (); uint16_t get_channel_mask (); boost::shared_ptr midi_playlist (); - + protected: XMLNode& state (bool full); diff --git a/libs/ardour/ardour/public_diskstream.h b/libs/ardour/ardour/public_diskstream.h index a33c43f0cd..5c2c6d9fc6 100755 --- a/libs/ardour/ardour/public_diskstream.h +++ b/libs/ardour/ardour/public_diskstream.h @@ -65,7 +65,6 @@ public: virtual ChanCount n_channels () = 0; virtual nframes_t get_capture_start_frame (uint32_t n = 0) = 0; virtual AlignStyle alignment_style () const = 0; - virtual void set_record_enabled (bool) = 0; virtual nframes_t current_capture_start () const = 0; virtual nframes_t current_capture_end () const = 0; virtual void playlist_modified () = 0; diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 7692583feb..54eb41f97b 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -112,7 +112,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, virtual void toggle_monitor_input (); virtual bool can_record() { return false; } - virtual void set_record_enable (bool /*yn*/, void * /*src*/) {} + virtual void set_record_enabled (bool /*yn*/, void * /*src*/) {} virtual bool record_enabled() const { return false; } virtual void handle_transport_stopped (bool abort, bool did_locate, bool flush_processors); virtual void set_pending_declick (int); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 18ef620a89..4627204888 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -282,6 +282,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi /** Emitted when anything about any of our route groups changes */ PBD::Signal0 RouteGroupChanged; + /* Step Editing status changed */ + PBD::Signal1 StepEditStatusChange; + void queue_event (SessionEvent*); void request_roll_at_and_return (nframes_t start, nframes_t return_to); @@ -591,7 +594,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi void set_just_one_solo (boost::shared_ptr, bool, SessionEvent::RTeventCallback after = rt_cleanup); void set_mute (boost::shared_ptr, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false); void set_listen (boost::shared_ptr, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false); - void set_record_enable (boost::shared_ptr, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false); + void set_record_enabled (boost::shared_ptr, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false); void set_solo_isolated (boost::shared_ptr, bool, SessionEvent::RTeventCallback after = rt_cleanup, bool group_override = false); PBD::Signal1 SoloActive; @@ -776,6 +779,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi PBD::Signal0 RouteOrderKeyChanged; + bool step_editing() const { return (_step_editors > 0); } + protected: friend class AudioEngine; void set_block_size (nframes_t nframes); @@ -1409,7 +1414,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi void rt_set_mute (boost::shared_ptr, bool yn, bool group_override); void rt_set_listen (boost::shared_ptr, bool yn, bool group_override); void rt_set_solo_isolated (boost::shared_ptr, bool yn, bool group_override); - void rt_set_record_enable (boost::shared_ptr, bool yn, bool group_override); + void rt_set_record_enabled (boost::shared_ptr, bool yn, bool group_override); /** temporary list of Diskstreams used only during load of 2.X sessions */ std::list > _diskstreams_2X; @@ -1420,6 +1425,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi void cleanup_stubfiles (); void route_order_key_changed (); + + void step_edit_status_change (bool); + uint32_t _step_editors; }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index 60e628af79..b3d69e4403 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -90,7 +90,7 @@ class Track : public Route, public PublicDiskstream boost::shared_ptr rec_enable_control() { return _rec_enable_control; } bool record_enabled() const; - void set_record_enable (bool yn, void *src); + void set_record_enabled (bool yn, void *src); /* XXX: unfortunate that this is exposed */ PBD::ID const & diskstream_id () const; @@ -132,7 +132,6 @@ class Track : public Route, public PublicDiskstream ChanCount n_channels (); nframes_t get_capture_start_frame (uint32_t n = 0); AlignStyle alignment_style () const; - void set_record_enabled (bool); nframes_t current_capture_start () const; nframes_t current_capture_end () const; void playlist_modified (); -- cgit v1.2.3