Merge with 2.0-ongoing R3082.
[ardour.git] / libs / ardour / ardour / audioregion.h
index b84d197c3f90b0def9e0e77d976285c7d91ac27d..e88e10d521a8ae38b641ba2b461ca42f0f6d0ada 100644 (file)
@@ -21,6 +21,7 @@
 #define __ardour_audio_region_h__
 
 #include <vector>
+#include <list>
 
 #include <pbd/fastlog.h>
 #include <pbd/undo.h>
@@ -75,6 +76,11 @@ class AudioRegion : public Region
                                      nframes_t offset, nframes_t cnt,
                                      uint32_t chan_n=0, double samples_per_unit= 1.0) const;
        
+       /* Readable interface */
+       
+       virtual nframes64_t read (Sample*, nframes64_t pos, nframes64_t cnt, int channel) const;
+       virtual nframes64_t readable_length() const { return length(); }
+
        virtual nframes_t read_at (Sample *buf, Sample *mixdown_buf,
                        float *gain_buf, nframes_t position, nframes_t cnt, 
                        uint32_t  chan_n      = 0,
@@ -119,7 +125,7 @@ class AudioRegion : public Region
 
        /* export */
 
-       int exportme (ARDOUR::Session&, ARDOUR::AudioExportSpecification&);
+       int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&);
 
        /* xfade/fade interactions */
 
@@ -128,12 +134,14 @@ class AudioRegion : public Region
        void resume_fade_in ();
        void resume_fade_out ();
 
+       int get_transients (AnalysisFeatureList&, bool force_new = false);
+
   private:
        friend class RegionFactory;
 
        AudioRegion (boost::shared_ptr<AudioSource>, nframes_t start, nframes_t length);
        AudioRegion (boost::shared_ptr<AudioSource>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
-       AudioRegion (SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
+       AudioRegion (const SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
        AudioRegion (boost::shared_ptr<const AudioRegion>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
        AudioRegion (boost::shared_ptr<AudioSource>, const XMLNode&);
        AudioRegion (SourceList &, const XMLNode&);
@@ -148,10 +156,11 @@ class AudioRegion : public Region
        void recompute_gain_at_start ();
 
        nframes_t _read_at (const SourceList&, Sample *buf, Sample *mixdown_buffer, 
-                                float *gain_buffer, nframes_t position, nframes_t cnt, 
-                                uint32_t chan_n = 0,
-                                nframes_t read_frames = 0,
-                                nframes_t skip_frames = 0) const;
+                           float *gain_buffer, nframes_t position, nframes_t cnt, 
+                           uint32_t chan_n = 0,
+                           nframes_t read_frames = 0,
+                           nframes_t skip_frames = 0,
+                           bool raw = false) const;
 
        void recompute_at_start ();
        void recompute_at_end ();
@@ -161,6 +170,7 @@ class AudioRegion : public Region
        void fade_out_changed ();
        void source_offset_changed ();
        void listen_to_my_curves ();
+       void listen_to_my_sources ();
 
        boost::shared_ptr<AutomationList> _fade_in;
        FadeShape                         _fade_in_shape;