Yamaha-PSR-S900.midnam: correct organ flutes, duplicate settings generated from fault...
[ardour.git] / libs / ardour / ardour / track.h
index 08bf170985e850fb9aeecd53f6bfbbeb7ef36b4f..6d2d73519c50f4834e450ca306e9526664e3f466 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <boost/shared_ptr.hpp>
 
+#include "ardour/interthread_info.h"
 #include "ardour/route.h"
 #include "ardour/public_diskstream.h"
 
@@ -87,15 +88,21 @@ class 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.
+        */
+       virtual bool bounceable (boost::shared_ptr<Processor> endpoint, bool include_endpoint) const = 0;
        virtual boost::shared_ptr<Region> bounce (InterThreadInfo&) = 0;
-       virtual boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing = true) = 0;
+       virtual boost::shared_ptr<Region> bounce_range (framepos_t start, framepos_t end, InterThreadInfo&, 
+                                                       boost::shared_ptr<Processor> endpoint, bool include_endpoint) = 0;
+       virtual int export_stuff (BufferSet& bufs, framepos_t start_frame, framecnt_t nframes,
+                                 boost::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export) = 0;
 
        XMLNode&    get_state();
        XMLNode&    get_template();
        virtual int set_state (const XMLNode&, int version);
        static void zero_diskstream_id_in_xml (XMLNode&);
 
-       boost::shared_ptr<PBD::Controllable> rec_enable_control() { return _rec_enable_control; }
+       boost::shared_ptr<AutomationControl> rec_enable_control() { return _rec_enable_control; }
 
        bool record_enabled() const;
        void set_record_enabled (bool yn, void *src);
@@ -104,11 +111,6 @@ class Track : public Route, public PublicDiskstream
 
        void set_block_size (pframes_t);
 
-       /** @return true if the track can be bounced, or false if it cannot because
-        *  it has more outputs than diskstream channels.
-        */
-       virtual bool bounceable () const = 0;
-
        /* PublicDiskstream interface */
        boost::shared_ptr<Playlist> playlist ();
        void request_jack_monitors_input (bool);
@@ -125,8 +127,8 @@ class Track : public Route, public PublicDiskstream
        void set_pending_overwrite (bool);
        int seek (framepos_t, bool complete_refill = false);
        bool hidden () const;
-       int can_internal_playback_seek (framepos_t);
-       int internal_playback_seek (framepos_t);
+       int can_internal_playback_seek (framecnt_t);
+       int internal_playback_seek (framecnt_t);
        void non_realtime_input_change ();
        void non_realtime_locate (framepos_t);
        void non_realtime_set_speed ();
@@ -157,6 +159,7 @@ class Track : public Route, public PublicDiskstream
 
        PBD::Signal0<void> DiskstreamChanged;
        PBD::Signal0<void> FreezeChange;
+       /* Emitted when our diskstream is set to use a different playlist */
        PBD::Signal0<void> PlaylistChanged;
        PBD::Signal0<void> RecordEnableChanged;
        PBD::Signal0<void> SpeedChanged;
@@ -198,13 +201,13 @@ class Track : public Route, public PublicDiskstream
                FreezeState                        state;
        };
 
-       struct RecEnableControllable : public PBD::Controllable {
-               RecEnableControllable (Track&);
+       struct RecEnableControl : public AutomationControl {
+               RecEnableControl (boost::shared_ptr<Track> t);
 
                void set_value (double);
                double get_value (void) const;
 
-               Track& track;
+               boost::weak_ptr<Track> track;
        };
 
        virtual void set_state_part_two () = 0;
@@ -215,9 +218,9 @@ class Track : public Route, public PublicDiskstream
 
        void maybe_declick (BufferSet&, framecnt_t, int);
 
-       boost::shared_ptr<RecEnableControllable> _rec_enable_control;
+       boost::shared_ptr<RecEnableControl> _rec_enable_control;
        
-       framecnt_t check_initial_delay (framecnt_t nframes, framecnt_t&);
+       framecnt_t check_initial_delay (framecnt_t nframes, framepos_t&);
 
 private: