libardour support for timespan realtime export
[ardour.git] / libs / ardour / ardour / audioplaylist.h
index 36fe027a6fda44e74a219aad48a5d19c688b111d..c4196dc3b616a2c77248d2517fbdc20d8df5e3d6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2003 Paul Davis 
+    Copyright (C) 2003 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_audio_playlist_h__
 #include <vector>
 #include <list>
 
-#include <ardour/ardour.h>
-#include <ardour/playlist.h>
+#include "ardour/ardour.h"
+#include "ardour/playlist.h"
 
 namespace ARDOUR  {
 
 class Session;
-class Region;
 class AudioRegion;
 class Source;
+class AudioPlaylist;
 
-class AudioPlaylist : public ARDOUR::Playlist
+class LIBARDOUR_API AudioPlaylist : public ARDOUR::Playlist
 {
-  public:
-       typedef std::list<boost::shared_ptr<Crossfade> > Crossfades;
-       
-   public:
+public:
        AudioPlaylist (Session&, const XMLNode&, bool hidden = false);
-       AudioPlaylist (Session&, string name, bool hidden = false);
-       AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, string name, bool hidden = false);
-       AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, nframes_t start, nframes_t cnt, string name, bool hidden = false);
+       AudioPlaylist (Session&, std::string name, bool hidden = false);
+       AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, std::string name, bool hidden = false);
+       AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, framepos_t start, framecnt_t cnt, std::string name, bool hidden = false);
 
-       ~AudioPlaylist ();
-
-       void clear (bool with_signals=true);
-
-        nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n=0);
-
-       int set_state (const XMLNode&);
-
-       sigc::signal<void,boost::shared_ptr<Crossfade> > NewCrossfade; 
-
-       template<class T> void foreach_crossfade (T *t, void (T::*func)(boost::shared_ptr<Crossfade>));
-       void crossfades_at (nframes_t frame, Crossfades&);
+       framecnt_t read (Sample *dst, Sample *mixdown, float *gain_buffer, framepos_t start, framecnt_t cnt, uint32_t chan_n=0);
 
        bool destroy_region (boost::shared_ptr<Region>);
 
-    protected:
-
-       /* playlist "callbacks" */
-       void notify_crossfade_added (boost::shared_ptr<Crossfade>);
-       void flush_notifications ();
-
-       void finalize_split_region (boost::shared_ptr<Region> orig, boost::shared_ptr<Region> left, boost::shared_ptr<Region> right);
-       
-        void refresh_dependents (boost::shared_ptr<Region> region);
-        void check_dependents (boost::shared_ptr<Region> region, bool norefresh);
-        void remove_dependents (boost::shared_ptr<Region> region);
-
-    private:
-       Crossfades      _crossfades;
-       Crossfades      _pending_xfade_adds;
-
-       void crossfade_invalidated (boost::shared_ptr<Crossfade>);
-       XMLNode& state (bool full_state);
-       void dump () const;
+protected:
 
-       bool region_changed (Change, boost::shared_ptr<Region>);
-       void crossfade_changed (Change);
-       void add_crossfade (boost::shared_ptr<Crossfade>);
+       void pre_combine (std::vector<boost::shared_ptr<Region> >&);
+       void post_combine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>);
+       void pre_uncombine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>);
 
-       void source_offset_changed (boost::shared_ptr<AudioRegion> region);
+private:
+       int set_state (const XMLNode&, int version);
+       void dump () const;
+       bool region_changed (const PBD::PropertyChange&, boost::shared_ptr<Region>);
+       void source_offset_changed (boost::shared_ptr<AudioRegion>);
+        void load_legacy_crossfades (const XMLNode&, int version);
 };
 
 } /* namespace ARDOUR */