Cleanup of region drag code to be a bit more efficient and shorter. Fixes crashes...
[ardour.git] / libs / ardour / ardour / audio_track.h
index be8d988a419e1f05158b652b078cef11a32f3319..ecd88b94e5abf79aa3b667a6a7dbe358fce9aa4d 100644 (file)
@@ -28,24 +28,26 @@ class Session;
 class AudioDiskstream;
 class AudioPlaylist;
 class RouteGroup;
+class AudioFileSource; 
 
 class AudioTrack : public Track
 {
   public:
        AudioTrack (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal);
-       AudioTrack (Session&, const XMLNode&, int);
        ~AudioTrack ();
 
        int set_mode (TrackMode m);
        bool can_use_mode (TrackMode m, bool& bounce_required);
 
-       int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
-                       int declick, bool can_record, bool rec_monitors_input);
+       int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+                  int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
 
-       boost::shared_ptr<AudioDiskstream> audio_diskstream() const;
+       void use_new_diskstream ();
+        void set_diskstream (boost::shared_ptr<Diskstream>);
 
-       int use_diskstream (std::string name);
-       int use_diskstream (const PBD::ID& id);
+       DataType data_type () const {
+               return DataType::AUDIO;
+       }
 
        int export_stuff (BufferSet& bufs, sframes_t start_frame, nframes_t nframes, bool enable_processing = true);
 
@@ -57,15 +59,16 @@ class AudioTrack : public Track
 
        int set_state(const XMLNode&, int version);
 
+       boost::shared_ptr<AudioFileSource> write_source (uint32_t n = 0);
+
   protected:
+       boost::shared_ptr<AudioDiskstream> audio_diskstream () const;
        XMLNode& state (bool full);
        
        int _set_state (const XMLNode&, int, bool call_base);
 
   private:
-       int  set_diskstream (boost::shared_ptr<AudioDiskstream>, void *);
        int  deprecated_use_diskstream_connections ();
-       void use_new_diskstream ();
        void set_state_part_two ();
        void set_state_part_three ();
 };