promote Playlist::RegionList to ARDOUR::RegionList; fix timefx on multiple regions...
[ardour.git] / libs / ardour / ardour / export_format_base.h
index e372553f2971f7ef323f415ce07dd1e2e9594d38..0ba5f73e8df87267e4a4a62777a80d9d3a740f0e 100644 (file)
@@ -24,7 +24,7 @@
 #include <set>
 #include <algorithm>
 #include <boost/shared_ptr.hpp>
-#include <glibmm/ustring.h>
+#include <string>
 
 #include <sndfile.h>
 #include <samplerate.h>
@@ -94,6 +94,7 @@ class ExportFormatBase {
 
        enum SampleRate {
                SR_None = 0,
+               SR_Session = 1,
                SR_22_05 = 220500,
                SR_44_1 = 44100,
                SR_48 = 48000,
@@ -122,19 +123,19 @@ class ExportFormatBase {
 
                bool selected () const { return _selected; }
                bool compatible () const { return _compatible; }
-               Glib::ustring name () const { return _name; }
+               std::string name () const { return _name; }
 
                void set_selected (bool value);
                void set_compatible (bool value);
 
          protected:
-               void set_name (Glib::ustring name) { _name = name; }
+               void set_name (std::string name) { _name = name; }
 
          private:
                bool _selected;
                bool _compatible;
 
-               Glib::ustring _name;
+               std::string _name;
        };
 
   public:
@@ -145,7 +146,6 @@ class ExportFormatBase {
        virtual ~ExportFormatBase ();
 
        boost::shared_ptr<ExportFormatBase> get_intersection (ExportFormatBase const & other) const;
-       boost::shared_ptr<ExportFormatBase> get_difference (ExportFormatBase const & other) const;
        boost::shared_ptr<ExportFormatBase> get_union (ExportFormatBase const & other) const;
 
        bool endiannesses_empty () const { return endiannesses.empty (); }
@@ -160,8 +160,10 @@ class ExportFormatBase {
        bool has_format (FormatId format) const { return format_ids.find (format) != format_ids.end(); }
        bool has_quality (Quality quality) const { return qualities.find (quality) != qualities.end(); }
 
-       void set_extension (Glib::ustring const & extension) { _extension = extension; }
-       Glib::ustring const & extension () const { return _extension; }
+       void set_extension (std::string const & extension) { _extension = extension; }
+       std::string const & extension () const { return _extension; }
+
+       static SampleRate nearest_sample_rate (framecnt_t sample_rate);
 
   protected:
 
@@ -182,11 +184,10 @@ class ExportFormatBase {
 
   private:
 
-       Glib::ustring  _extension;
+       std::string  _extension;
 
        enum SetOperation {
                SetUnion,
-               SetDifference,
                SetIntersection
        };