X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Ftrack.h;h=c49cbd00e24c4a2bd92d4a3e43259bbe6cd15aab;hb=04c56a0618f668fac288fb2070fcf200a83aebc6;hp=5bf887f51728f97b2a3609e46710c12404268494;hpb=9e3299f97da874a48f67dc5ff0e0f87a6a54768a;p=ardour.git diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index 5bf887f517..c49cbd00e2 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -35,6 +35,11 @@ class Region; class Diskstream; class IO; +/** A track is an route (bus) with a recordable diskstream and + * related objects relevant to tracking, playback and editing. + * + * Specifically a track has regions and playlist objects. + */ class LIBARDOUR_API Track : public Route, public PublicDiskstream { public: @@ -51,11 +56,23 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream virtual bool can_use_mode (TrackMode /*m*/, bool& /*bounce_required*/) { return false; } PBD::Signal0 TrackModeChanged; - virtual void set_monitoring (MonitorChoice); + class LIBARDOUR_API MonitoringControllable : public RouteAutomationControl { + public: + MonitoringControllable (std::string name, boost::shared_ptr); + void set_value (double, PBD::Controllable::GroupControlDisposition group_override); + /* currently no automation, so no need for set_value_unchecked() */ + double get_value () const; + private: + void _set_value (double, PBD::Controllable::GroupControlDisposition group_override); + }; + + void set_monitoring (MonitorChoice, PBD::Controllable::GroupControlDisposition group_override); MonitorChoice monitoring_choice() const { return _monitoring; } MonitorState monitoring_state () const; PBD::Signal0 MonitoringChanged; + boost::shared_ptr monitoring_control() const { return _monitoring_control; } + MeterState metering_state () const; virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, @@ -90,11 +107,26 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream virtual void freeze_me (InterThreadInfo&) = 0; virtual void unfreeze () = 0; - /** @return true if the track can be bounced, or false otherwise. + /** Test if the track can be bounced with the given settings. + * If sends/inserts/returns are present in the signal path or the given track + * has no audio outputs bouncing is not possible. + * + * @param endpoint the processor to tap the signal off (or nil for the top) + * @param include_endpoint include the given processor in the bounced audio. + * @return true if the track can be bounced, or false otherwise. */ virtual bool bounceable (boost::shared_ptr endpoint, bool include_endpoint) const = 0; virtual boost::shared_ptr bounce (InterThreadInfo&) = 0; - virtual boost::shared_ptr bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, + + /** Bounce the given range to a new audio region. + * @param start start time (in samples) + * @param end end time (in samples) + * @param itt asynchronous progress report and cancel + * @param endpoint the processor to tap the signal off (or nil for the top) + * @param include_endpoint include the given processor in the bounced audio. + * @return a new audio region (or nil in case of error) + */ + virtual boost::shared_ptr bounce_range (framepos_t start, framepos_t end, InterThreadInfo& itt, boost::shared_ptr endpoint, bool include_endpoint) = 0; virtual int export_stuff (BufferSet& bufs, framepos_t start_frame, framecnt_t nframes, boost::shared_ptr endpoint, bool include_endpoint, bool for_export, bool for_freeze) = 0; @@ -108,9 +140,9 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream bool record_enabled() const; bool record_safe () const; - void set_record_enabled (bool yn, void *src); - void set_record_safe (bool yn, void *src); - void prep_record_enabled (bool yn, void *src); + void set_record_enabled (bool yn, PBD::Controllable::GroupControlDisposition); + void set_record_safe (bool yn, PBD::Controllable::GroupControlDisposition); + void prep_record_enabled (bool yn, PBD::Controllable::GroupControlDisposition); bool using_diskstream_id (PBD::ID) const; @@ -179,6 +211,7 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream TrackMode _mode; bool _needs_butler; MonitorChoice _monitoring; + boost::shared_ptr _monitoring_control; //private: (FIXME) struct FreezeRecordProcessorInfo { @@ -203,7 +236,8 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream FreezeState state; }; - struct RecEnableControl : public AutomationControl { + class RecEnableControl : public AutomationControl { + public: RecEnableControl (boost::shared_ptr t); void set_value (double, PBD::Controllable::GroupControlDisposition); @@ -211,6 +245,9 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream double get_value (void) const; boost::weak_ptr track; + + private: + void _set_value (double, PBD::Controllable::GroupControlDisposition); }; virtual void set_state_part_two () = 0;