diff options
Diffstat (limited to 'libs/ardour/ardour')
22 files changed, 164 insertions, 166 deletions
diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h index 6d2b2410fd..3ec17cda59 100644 --- a/libs/ardour/ardour/audio_unit.h +++ b/libs/ardour/ardour/audio_unit.h @@ -167,7 +167,7 @@ class AUPluginInfo : public PluginInfo { AUPluginCachedInfo cache; static PluginInfoList* discover (); - static void get_names (CAComponentDescription&, std::string& name, Glib::ustring& maker); + static void get_names (CAComponentDescription&, std::string& name, std::string& maker); static std::string stringify_descriptor (const CAComponentDescription&); static int load_cached_info (); @@ -180,7 +180,7 @@ class AUPluginInfo : public PluginInfo { static void discover_fx (PluginInfoList&); static void discover_generators (PluginInfoList&); static void discover_by_description (PluginInfoList&, CAComponentDescription&); - static Glib::ustring au_cache_path (); + static std::string au_cache_path (); typedef std::map<std::string,AUPluginCachedInfo> CachedInfoMap; static CachedInfoMap cached_info; diff --git a/libs/ardour/ardour/audiofilesource.h b/libs/ardour/ardour/audiofilesource.h index f0710843f8..3aef900630 100644 --- a/libs/ardour/ardour/audiofilesource.h +++ b/libs/ardour/ardour/audiofilesource.h @@ -43,15 +43,15 @@ public: return (set_source_name(newname, destructive()) == 0); } - Glib::ustring peak_path (Glib::ustring audio_path); - Glib::ustring find_broken_peakfile (Glib::ustring missing_peak_path, - Glib::ustring audio_path); + std::string peak_path (std::string audio_path); + std::string find_broken_peakfile (std::string missing_peak_path, + std::string audio_path); - static void set_peak_dir (Glib::ustring dir) { peak_dir = dir; } + static void set_peak_dir (std::string dir) { peak_dir = dir; } - static bool get_soundfile_info (Glib::ustring path, SoundFileInfo& _info, std::string& error); + static bool get_soundfile_info (std::string path, SoundFileInfo& _info, std::string& error); - bool safe_file_extension (const Glib::ustring& path) const { + bool safe_file_extension (const std::string& path) const { return safe_audio_file_extension(path); } @@ -77,9 +77,9 @@ public: bool can_truncate_peaks() const { return !destructive(); } bool can_be_analysed() const { return _length > 0; } - static bool safe_audio_file_extension (const Glib::ustring& path); + static bool safe_audio_file_extension (const std::string& path); - static bool is_empty (Session&, Glib::ustring path); + static bool is_empty (Session&, std::string path); static void set_bwf_serial_number (int); static void set_header_position_offset (nframes_t offset ); @@ -88,16 +88,16 @@ public: protected: /** Constructor to be called for existing external-to-session files */ - AudioFileSource (Session&, const Glib::ustring& path, Source::Flag flags); + AudioFileSource (Session&, const std::string& path, Source::Flag flags); /** Constructor to be called for new in-session files */ - AudioFileSource (Session&, const Glib::ustring& path, Source::Flag flags, + AudioFileSource (Session&, const std::string& path, Source::Flag flags, SampleFormat samp_format, HeaderFormat hdr_format); /** Constructor to be called for existing in-session files */ AudioFileSource (Session&, const XMLNode&, bool must_exist = true); - int init (const Glib::ustring& idstr, bool must_exist); + int init (const std::string& idstr, bool must_exist); virtual void set_header_timeline_position () = 0; virtual void handle_header_position_change () {} @@ -106,7 +106,7 @@ protected: static Sample* get_interleave_buffer (nframes_t size); - static Glib::ustring peak_dir; + static std::string peak_dir; static char bwf_country_code[3]; static char bwf_organization_code[4]; @@ -115,8 +115,8 @@ protected: static uint64_t header_position_offset; private: - Glib::ustring old_peak_path (Glib::ustring audio_path); - Glib::ustring broken_peak_path (Glib::ustring audio_path); + std::string old_peak_path (std::string audio_path); + std::string broken_peak_path (std::string audio_path); }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index 249757f9b4..7ea7260688 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -26,7 +26,6 @@ #include <time.h> #include <glibmm/thread.h> -#include <glibmm/ustring.h> #include <boost/function.hpp> #include "ardour/source.h" @@ -43,7 +42,7 @@ class AudioSource : virtual public Source, public boost::enable_shared_from_this<ARDOUR::AudioSource> { public: - AudioSource (Session&, Glib::ustring name); + AudioSource (Session&, std::string name); AudioSource (Session&, const XMLNode&); virtual ~AudioSource (); @@ -65,8 +64,8 @@ class AudioSource : virtual public Source, virtual bool can_truncate_peaks() const { return true; } - void set_captured_for (Glib::ustring str) { _captured_for = str; } - Glib::ustring captured_for() const { return _captured_for; } + void set_captured_for (std::string str) { _captured_for = str; } + std::string captured_for() const { return _captured_for; } uint32_t read_data_count() const { return _read_data_count; } uint32_t write_data_count() const { return _write_data_count; } @@ -84,7 +83,7 @@ class AudioSource : virtual public Source, XMLNode& get_state (); int set_state (const XMLNode&, int version); - int rename_peakfile (Glib::ustring newpath); + int rename_peakfile (std::string newpath); void touch_peakfile (); static void set_build_missing_peakfiles (bool yn) { @@ -114,13 +113,13 @@ class AudioSource : virtual public Source, framecnt_t _length; bool _peaks_built; mutable Glib::Mutex _peaks_ready_lock; - Glib::ustring peakpath; - Glib::ustring _captured_for; + std::string peakpath; + std::string _captured_for; mutable uint32_t _read_data_count; // modified in read() mutable uint32_t _write_data_count; // modified in write() - int initialize_peakfile (bool newfile, Glib::ustring path); + int initialize_peakfile (bool newfile, std::string path); int build_peaks_from_scratch (); int compute_and_write_peaks (Sample* buf, framepos_t first_frame, framecnt_t cnt, bool force, bool intermediate_peaks_ready_signal); @@ -130,9 +129,9 @@ class AudioSource : virtual public Source, virtual framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const = 0; virtual framecnt_t write_unlocked (Sample *dst, framecnt_t cnt) = 0; - virtual Glib::ustring peak_path(Glib::ustring audio_path) = 0; - virtual Glib::ustring find_broken_peakfile (Glib::ustring missing_peak_path, - Glib::ustring audio_path) = 0; + virtual std::string peak_path(std::string audio_path) = 0; + virtual std::string find_broken_peakfile (std::string missing_peak_path, + std::string audio_path) = 0; virtual int read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t start, framecnt_t cnt, diff --git a/libs/ardour/ardour/export_channel_configuration.h b/libs/ardour/ardour/export_channel_configuration.h index e088aba2f0..932a74328c 100644 --- a/libs/ardour/ardour/export_channel_configuration.h +++ b/libs/ardour/ardour/export_channel_configuration.h @@ -22,7 +22,7 @@ #define __ardour_export_channel_configuration_h__ #include <list> -#include <glibmm/ustring.h> +#include <string> #include <boost/enable_shared_from_this.hpp> #include "ardour/export_channel.h" @@ -62,8 +62,8 @@ class ExportChannelConfiguration : public boost::enable_shared_from_this<ExportC ChannelList const & get_channels () const { return channels; } bool all_channels_have_ports () const; - Glib::ustring name () const { return _name; } - void set_name (Glib::ustring name) { _name = name; } + std::string name () const { return _name; } + void set_name (std::string name) { _name = name; } void set_split (bool value) { split = value; } bool get_split () const { return split; } @@ -82,7 +82,7 @@ class ExportChannelConfiguration : public boost::enable_shared_from_this<ExportC ChannelList channels; bool split; // Split to mono files - Glib::ustring _name; + std::string _name; }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/export_filename.h b/libs/ardour/ardour/export_filename.h index c5f0e3b5ca..d046b9a501 100644 --- a/libs/ardour/ardour/export_filename.h +++ b/libs/ardour/ardour/export_filename.h @@ -22,7 +22,7 @@ #define __ardour_export_filename_h__ #include <boost/shared_ptr.hpp> -#include <glibmm/ustring.h> +#include <string> #include "pbd/statefuldestructible.h" namespace ARDOUR @@ -68,25 +68,25 @@ class ExportFilename { /* data access */ - Glib::ustring get_path (FormatPtr format) const; - Glib::ustring get_folder () const { return folder; } + std::string get_path (FormatPtr format) const; + std::string get_folder () const { return folder; } TimeFormat get_time_format () const { return time_format; } DateFormat get_date_format () const { return date_format; } - Glib::ustring get_time_format_str (TimeFormat format) const; - Glib::ustring get_date_format_str (DateFormat format) const; + std::string get_time_format_str (TimeFormat format) const; + std::string get_date_format_str (DateFormat format) const; - Glib::ustring get_label () const { return label; } + std::string get_label () const { return label; } uint32_t get_revision () const { return revision; } /* data modification */ void set_time_format (TimeFormat format); void set_date_format (DateFormat format); - void set_label (Glib::ustring value); + void set_label (std::string value); void set_revision (uint32_t value) { revision = value; } void set_channel (uint32_t value) { channel = value; } - bool set_folder (Glib::ustring path); + bool set_folder (std::string path); void set_timespan (TimespanPtr ts) { timespan = ts; } void set_channel_config (ChannelConfigPtr cc) { channel_config = cc; } @@ -106,16 +106,16 @@ class ExportFilename { Session & session; - Glib::ustring label; + std::string label; uint32_t revision; uint32_t channel; - Glib::ustring folder; + std::string folder; DateFormat date_format; TimeFormat time_format; - Glib::ustring get_formatted_time (Glib::ustring const & format) const; + std::string get_formatted_time (std::string const & format) const; // Due to the static allocation used in strftime(), no destructor or copy-ctor is needed for this struct tm * time_struct; @@ -124,10 +124,10 @@ class ExportFilename { /* Serialization helpers */ - typedef std::pair<bool, Glib::ustring> FieldPair; + typedef std::pair<bool, std::string> FieldPair; - void add_field (XMLNode * node, Glib::ustring const & name, bool enabled, Glib::ustring const & value = ""); - FieldPair get_field (XMLNode const & node, Glib::ustring const & name); + void add_field (XMLNode * node, std::string const & name, bool enabled, std::string const & value = ""); + FieldPair get_field (XMLNode const & node, std::string const & name); FieldPair analyse_folder (); }; diff --git a/libs/ardour/ardour/export_format_base.h b/libs/ardour/ardour/export_format_base.h index e372553f29..3bd2bf98fb 100644 --- a/libs/ardour/ardour/export_format_base.h +++ b/libs/ardour/ardour/export_format_base.h @@ -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> @@ -122,19 +122,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: @@ -160,8 +160,8 @@ 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; } protected: @@ -182,7 +182,7 @@ class ExportFormatBase { private: - Glib::ustring _extension; + std::string _extension; enum SetOperation { SetUnion, diff --git a/libs/ardour/ardour/export_format_compatibility.h b/libs/ardour/ardour/export_format_compatibility.h index cd2dae5e20..e0a984db6c 100644 --- a/libs/ardour/ardour/export_format_compatibility.h +++ b/libs/ardour/ardour/export_format_compatibility.h @@ -21,6 +21,7 @@ #ifndef __ardour_export_format_compatibility_h__ #define __ardour_export_format_compatibility_h__ +#include <string> #include "ardour/export_format_base.h" namespace ARDOUR @@ -31,7 +32,7 @@ class ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBa private: public: - ExportFormatCompatibility (Glib::ustring name) + ExportFormatCompatibility (std::string name) { set_name (name); sample_formats.insert (SF_None); diff --git a/libs/ardour/ardour/export_format_manager.h b/libs/ardour/ardour/export_format_manager.h index 0d1a0310d9..f82230b8c3 100644 --- a/libs/ardour/ardour/export_format_manager.h +++ b/libs/ardour/ardour/export_format_manager.h @@ -65,7 +65,7 @@ class ExportFormatManager : public PBD::ScopedConnectionList class QualityState : public ExportFormatBase::SelectableCompatible { public: - QualityState (ExportFormatBase::Quality quality, Glib::ustring name) : + QualityState (ExportFormatBase::Quality quality, std::string name) : quality (quality) { set_name (name); } ExportFormatBase::Quality quality; }; @@ -77,7 +77,7 @@ class ExportFormatManager : public PBD::ScopedConnectionList class SampleRateState : public ExportFormatBase::SelectableCompatible { public: - SampleRateState (ExportFormatBase::SampleRate rate, Glib::ustring name) + SampleRateState (ExportFormatBase::SampleRate rate, std::string name) : rate (rate) { set_name (name); } ExportFormatBase::SampleRate rate; }; @@ -103,7 +103,7 @@ class ExportFormatManager : public PBD::ScopedConnectionList /* Non interactive selections */ - void set_name (Glib::ustring name); + void set_name (std::string name); void select_src_quality (ExportFormatBase::SRCQuality value); void select_trim_beginning (bool value); diff --git a/libs/ardour/ardour/export_format_specification.h b/libs/ardour/ardour/export_format_specification.h index 3b9382237c..9594485a91 100644 --- a/libs/ardour/ardour/export_format_specification.h +++ b/libs/ardour/ardour/export_format_specification.h @@ -21,7 +21,7 @@ #ifndef __ardour_export_format_specification_h__ #define __ardour_export_format_specification_h__ -#include <glibmm/ustring.h> +#include <string> #include "pbd/uuid.h" @@ -76,7 +76,7 @@ class ExportFormatSpecification : public ExportFormatBase { void set_format (boost::shared_ptr<ExportFormat> format); - void set_name (Glib::ustring const & name) { _name = name; } + void set_name (std::string const & name) { _name = name; } void set_type (Type type) { _type = type; } void set_format_id (FormatId value) { format_ids.clear(); format_ids.insert (value); } @@ -100,12 +100,12 @@ class ExportFormatSpecification : public ExportFormatBase { /* Accessing functions */ PBD::UUID const & id () { return _id; } - Glib::ustring const & name () const { return _name; } - Glib::ustring description (); + std::string const & name () const { return _name; } + std::string description (); bool has_broadcast_info () const { return _has_broadcast_info; } uint32_t channel_limit () const { return _channel_limit; } - Glib::ustring format_name () const { return _format_name; } + std::string format_name () const { return _format_name; } Type type () const { return _type; } FormatId format_id () const { return *format_ids.begin(); } @@ -144,7 +144,7 @@ class ExportFormatSpecification : public ExportFormatBase { /* The variables below do not have setters (usually set via set_format) */ - Glib::ustring _format_name; + std::string _format_name; bool has_sample_format; bool supports_tagging; bool _has_broadcast_info; @@ -152,7 +152,7 @@ class ExportFormatSpecification : public ExportFormatBase { /* The variables below have getters and setters */ - Glib::ustring _name; + std::string _name; PBD::UUID _id; Type _type; diff --git a/libs/ardour/ardour/export_formats.h b/libs/ardour/ardour/export_formats.h index 03585f79a9..c29f7a4fbf 100644 --- a/libs/ardour/ardour/export_formats.h +++ b/libs/ardour/ardour/export_formats.h @@ -91,7 +91,7 @@ class HasSampleFormat : public PBD::ScopedConnectionList { class SampleFormatState : public ExportFormatBase::SelectableCompatible { public: - SampleFormatState (ExportFormatBase::SampleFormat format, Glib::ustring name) : + SampleFormatState (ExportFormatBase::SampleFormat format, std::string name) : format (format) { set_name (name); } ExportFormatBase::SampleFormat format; @@ -145,7 +145,7 @@ class HasSampleFormat : public PBD::ScopedConnectionList { private: /* Connected to signals */ - void add_dither_type (ExportFormatBase::DitherType type, Glib::ustring name); + void add_dither_type (ExportFormatBase::DitherType type, std::string name); void update_sample_format_selection (bool); void update_dither_type_selection (bool); @@ -156,7 +156,7 @@ class HasSampleFormat : public PBD::ScopedConnectionList { class ExportFormatLinear : public ExportFormat, public HasSampleFormat { public: - ExportFormatLinear (Glib::ustring name, FormatId format_id); + ExportFormatLinear (std::string name, FormatId format_id); ~ExportFormatLinear () {}; bool set_compatibility_state (ExportFormatCompatibility const & compatibility); diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h index aff481eced..b8e86d11df 100644 --- a/libs/ardour/ardour/export_profile_manager.h +++ b/libs/ardour/ardour/export_profile_manager.h @@ -25,10 +25,10 @@ #include <vector> #include <map> #include <stdexcept> +#include <string> #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> -#include <glibmm/ustring.h> #include "pbd/uuid.h" #include "pbd/file_utils.h" @@ -137,7 +137,7 @@ class ExportProfileManager typedef std::list<TimespanStatePtr> TimespanStateList; void set_selection_range (nframes_t start = 0, nframes_t end = 0); - std::string set_single_range (nframes_t start, nframes_t end, Glib::ustring name); + std::string set_single_range (nframes_t start, nframes_t end, std::string name); TimespanStateList const & get_timespans () { return check_list (timespans); } private: @@ -250,9 +250,9 @@ class ExportProfileManager /* Warnings */ public: struct Warnings { - std::list<Glib::ustring> errors; - std::list<Glib::ustring> warnings; - std::list<Glib::ustring> conflicting_filenames; + std::list<std::string> errors; + std::list<std::string> warnings; + std::list<std::string> conflicting_filenames; }; boost::shared_ptr<Warnings> get_warnings (); diff --git a/libs/ardour/ardour/export_timespan.h b/libs/ardour/ardour/export_timespan.h index 9053ace0f9..592f36b1a9 100644 --- a/libs/ardour/ardour/export_timespan.h +++ b/libs/ardour/ardour/export_timespan.h @@ -23,8 +23,7 @@ #include <map> #include <list> - -#include <glibmm/ustring.h> +#include <string> #include "ardour/export_status.h" #include "ardour/export_channel.h" @@ -48,11 +47,11 @@ class ExportTimespan public: ~ExportTimespan (); - Glib::ustring name () const { return _name; } - void set_name (Glib::ustring name) { _name = name; } + std::string name () const { return _name; } + void set_name (std::string name) { _name = name; } - Glib::ustring range_id () const { return _range_id; } - void set_range_id (Glib::ustring range_id) { _range_id = range_id; } + std::string range_id () const { return _range_id; } + void set_range_id (std::string range_id) { _range_id = range_id; } void set_range (nframes_t start, nframes_t end); nframes_t get_length () const { return end_frame - start_frame; } @@ -68,8 +67,8 @@ class ExportTimespan nframes_t position; nframes_t frame_rate; - Glib::ustring _name; - Glib::ustring _range_id; + std::string _name; + std::string _range_id; }; diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h index 379d391c73..aa4fe973b1 100644 --- a/libs/ardour/ardour/file_source.h +++ b/libs/ardour/ardour/file_source.h @@ -34,55 +34,55 @@ public: /** A source associated with a file on disk somewhere */ class FileSource : virtual public Source { public: - const Glib::ustring& path() const { return _path; } + const std::string& path() const { return _path; } int unstubify (); void stubify (); - virtual bool safe_file_extension (const Glib::ustring& path) const = 0; + virtual bool safe_file_extension (const std::string& path) const = 0; - int move_to_trash (const Glib::ustring& trash_dir_name); - void mark_take (const Glib::ustring& id); + int move_to_trash (const std::string& trash_dir_name); + void mark_take (const std::string& id); void mark_immutable (); void mark_nonremovable (); - const Glib::ustring& take_id () const { return _take_id; } + const std::string& take_id () const { return _take_id; } bool within_session () const { return _within_session; } uint16_t channel() const { return _channel; } int set_state (const XMLNode&, int version); - int set_source_name (const Glib::ustring& newname, bool destructive); + int set_source_name (const std::string& newname, bool destructive); - static void set_search_path (DataType type, const Glib::ustring& path); + static void set_search_path (DataType type, const std::string& path); - static bool find (DataType type, const Glib::ustring& path, + static bool find (DataType type, const std::string& path, bool must_exist, bool& is_new, uint16_t& chan, - Glib::ustring& found_path); + std::string& found_path); void inc_use_count (); bool removable () const; protected: FileSource (Session& session, DataType type, - const Glib::ustring& path, + const std::string& path, Source::Flag flags = Source::Flag(0)); FileSource (Session& session, const XMLNode& node, bool must_exist); - virtual int init (const Glib::ustring& idstr, bool must_exist); + virtual int init (const std::string& idstr, bool must_exist); virtual void set_path (const std::string&); virtual int move_dependents_to_trash() { return 0; } void set_within_session_from_path (const std::string&); - Glib::ustring _path; - Glib::ustring _take_id; + std::string _path; + std::string _take_id; bool _file_is_new; uint16_t _channel; bool _within_session; - static std::map<DataType, Glib::ustring> search_paths; + static std::map<DataType, std::string> search_paths; }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/import_status.h b/libs/ardour/ardour/import_status.h index 90513e8639..d06a464716 100644 --- a/libs/ardour/ardour/import_status.h +++ b/libs/ardour/ardour/import_status.h @@ -37,7 +37,7 @@ struct ImportStatus : public InterThreadInfo { uint32_t total; SrcQuality quality; volatile bool freeze; - std::vector<Glib::ustring> paths; + std::vector<std::string> paths; bool replace_existing_source; /* result */ diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 328f657b57..4f9ce3e7ea 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -21,7 +21,7 @@ #define __ardour_plugin_h__ #include <boost/shared_ptr.hpp> -#include <glibmm/ustring.h> +#include <string> #include "pbd/statefuldestructible.h" #include "pbd/controllable.h" @@ -55,8 +55,8 @@ class PluginInfo { std::string name; std::string category; - Glib::ustring creator; - Glib::ustring path; + std::string creator; + std::string path; ChanCount n_inputs; ChanCount n_outputs; ARDOUR::PluginType type; diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 7834c644e6..db7a59b76d 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -177,7 +177,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi int ensure_subdirs (); - Glib::ustring peak_path (Glib::ustring) const; + std::string peak_path (std::string) const; std::string change_source_path_by_name (std::string oldpath, std::string oldname, std::string newname, bool destructive); @@ -540,7 +540,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi boost::shared_ptr<MidiSource> create_midi_source_for_session (Track*, std::string const &, bool as_stub = false); boost::shared_ptr<Source> source_by_id (const PBD::ID&); - boost::shared_ptr<Source> source_by_path_and_channel (const Glib::ustring&, uint16_t); + boost::shared_ptr<Source> source_by_path_and_channel (const std::string&, uint16_t); void add_playlist (boost::shared_ptr<Playlist>, bool unused = false); diff --git a/libs/ardour/ardour/session_configuration_vars.h b/libs/ardour/ardour/session_configuration_vars.h index 0e676c7090..828b2cbfcf 100644 --- a/libs/ardour/ardour/session_configuration_vars.h +++ b/libs/ardour/ardour/session_configuration_vars.h @@ -34,7 +34,7 @@ CONFIG_VARIABLE (bool, punch_in, "punch-in", false) CONFIG_VARIABLE (bool, punch_out, "punch-out", false) CONFIG_VARIABLE (uint32_t, subframes_per_frame, "subframes-per-frame", 100) CONFIG_VARIABLE (TimecodeFormat, timecode_format, "timecode-format", timecode_30) -CONFIG_VARIABLE_SPECIAL(Glib::ustring, raid_path, "raid-path", "", path_expand) +CONFIG_VARIABLE_SPECIAL(std::string, raid_path, "raid-path", "", path_expand) CONFIG_VARIABLE (std::string, bwf_country_code, "bwf-country-code", "US") CONFIG_VARIABLE (std::string, bwf_organization_code, "bwf-organization-code", "US") CONFIG_VARIABLE (LayerModel, layer_model, "layer-model", MoveAddHigher) diff --git a/libs/ardour/ardour/session_metadata.h b/libs/ardour/ardour/session_metadata.h index 481e21c338..296bf6243f 100644 --- a/libs/ardour/ardour/session_metadata.h +++ b/libs/ardour/ardour/session_metadata.h @@ -21,7 +21,6 @@ #define __ardour_session_metadata_h__ #include <string> -#include <glibmm/ustring.h> #include <map> #include <utility> @@ -42,68 +41,68 @@ class SessionMetadata : public PBD::StatefulDestructible ~SessionMetadata (); /*** Accessing ***/ - Glib::ustring comment () const; - Glib::ustring copyright () const; - Glib::ustring isrc () const; + std::string comment () const; + std::string copyright () const; + std::string isrc () const; uint32_t year () const; - Glib::ustring grouping () const; - Glib::ustring title () const; - Glib::ustring subtitle () const; - - Glib::ustring artist () const; - Glib::ustring album_artist () const; - Glib::ustring lyricist () const; - Glib::ustring composer () const; - Glib::ustring conductor () const; - Glib::ustring remixer () const; - Glib::ustring arranger () const; - Glib::ustring engineer () const; - Glib::ustring producer () const; - Glib::ustring dj_mixer () const; - Glib::ustring mixer () const; - - Glib::ustring album () const; - Glib::ustring compilation () const; - Glib::ustring disc_subtitle () const; + std::string grouping () const; + std::string title () const; + std::string subtitle () const; + + std::string artist () const; + std::string album_artist () const; + std::string lyricist () const; + std::string composer () const; + std::string conductor () const; + std::string remixer () const; + std::string arranger () const; + std::string engineer () const; + std::string producer () const; + std::string dj_mixer () const; + std::string mixer () const; + + std::string album () const; + std::string compilation () const; + std::string disc_subtitle () const; uint32_t disc_number () const; uint32_t total_discs () const; uint32_t track_number () const; uint32_t total_tracks () const; - Glib::ustring genre () const; + std::string genre () const; /*** Editing ***/ - void set_comment (const Glib::ustring &); - void set_copyright (const Glib::ustring &); - void set_isrc (const Glib::ustring &); + void set_comment (const std::string &); + void set_copyright (const std::string &); + void set_isrc (const std::string &); void set_year (uint32_t); - void set_grouping (const Glib::ustring &); - void set_title (const Glib::ustring &); - void set_subtitle (const Glib::ustring &); - - void set_artist (const Glib::ustring &); - void set_album_artist (const Glib::ustring &); - void set_lyricist (const Glib::ustring &); - void set_composer (const Glib::ustring &); - void set_conductor (const Glib::ustring &); - void set_remixer (const Glib::ustring &); - void set_arranger (const Glib::ustring &); - void set_engineer (const Glib::ustring &); - void set_producer (const Glib::ustring &); - void set_dj_mixer (const Glib::ustring &); - void set_mixer (const Glib::ustring &); - - void set_album (const Glib::ustring &); - void set_compilation (const Glib::ustring &); - void set_disc_subtitle (const Glib::ustring &); + void set_grouping (const std::string &); + void set_title (const std::string &); + void set_subtitle (const std::string &); + + void set_artist (const std::string &); + void set_album_artist (const std::string &); + void set_lyricist (const std::string &); + void set_composer (const std::string &); + void set_conductor (const std::string &); + void set_remixer (const std::string &); + void set_arranger (const std::string &); + void set_engineer (const std::string &); + void set_producer (const std::string &); + void set_dj_mixer (const std::string &); + void set_mixer (const std::string &); + + void set_album (const std::string &); + void set_compilation (const std::string &); + void set_disc_subtitle (const std::string &); void set_disc_number (uint32_t); void set_total_discs (uint32_t); void set_track_number (uint32_t); void set_total_tracks (uint32_t); - void set_genre (const Glib::ustring &); + void set_genre (const std::string &); /*** Serialization ***/ XMLNode & get_state (); @@ -111,17 +110,17 @@ class SessionMetadata : public PBD::StatefulDestructible private: - typedef std::pair<Glib::ustring, Glib::ustring> Property; - typedef std::map<Glib::ustring, Glib::ustring> PropertyMap; + typedef std::pair<std::string, std::string> Property; + typedef std::map<std::string, std::string> PropertyMap; PropertyMap map; - XMLNode * get_xml (const Glib::ustring & name); + XMLNode * get_xml (const std::string & name); - Glib::ustring get_value (const Glib::ustring & name) const; - uint32_t get_uint_value (const Glib::ustring & name) const; + std::string get_value (const std::string & name) const; + uint32_t get_uint_value (const std::string & name) const; - void set_value (const Glib::ustring & name, const Glib::ustring & value); - void set_value (const Glib::ustring & name, uint32_t value); + void set_value (const std::string & name, const std::string & value); + void set_value (const std::string & name, uint32_t value); }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h index ab62a2d211..165e03e483 100644 --- a/libs/ardour/ardour/smf_source.h +++ b/libs/ardour/ardour/smf_source.h @@ -37,7 +37,7 @@ template<typename T> class MidiRingBuffer; class SMFSource : public MidiSource, public FileSource, public Evoral::SMF { public: /** Constructor for existing external-to-session files */ - SMFSource (Session& session, const Glib::ustring& path, + SMFSource (Session& session, const std::string& path, Source::Flag flags = Source::Flag(0)); /** Constructor for existing in-session files */ @@ -45,7 +45,7 @@ public: virtual ~SMFSource (); - bool safe_file_extension (const Glib::ustring& path) const { + bool safe_file_extension (const std::string& path) const { return safe_midi_file_extension(path); } @@ -67,7 +67,7 @@ public: static void set_header_position_offset (nframes_t offset, bool negative); - static bool safe_midi_file_extension (const Glib::ustring& path); + static bool safe_midi_file_extension (const std::string& path); protected: void set_path (const std::string& newpath); diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h index 151889dbb5..59dd603236 100644 --- a/libs/ardour/ardour/sndfilesource.h +++ b/libs/ardour/ardour/sndfilesource.h @@ -31,10 +31,10 @@ namespace ARDOUR { class SndFileSource : public AudioFileSource { public: /** Constructor to be called for existing external-to-session files */ - SndFileSource (Session&, const Glib::ustring& path, int chn, Flag flags); + SndFileSource (Session&, const std::string& path, int chn, Flag flags); /* Constructor to be called for new in-session files */ - SndFileSource (Session&, const Glib::ustring& path, + SndFileSource (Session&, const std::string& path, SampleFormat samp_format, HeaderFormat hdr_format, nframes_t rate, Flag flags = SndFileSource::default_writable_flags); @@ -63,7 +63,7 @@ class SndFileSource : public AudioFileSource { static void setup_standard_crossfades (Session const &, nframes_t sample_rate); static const Source::Flag default_writable_flags; - static int get_soundfile_info (const Glib::ustring& path, SoundFileInfo& _info, std::string& error_msg); + static int get_soundfile_info (const std::string& path, SoundFileInfo& _info, std::string& error_msg); protected: void set_path (const std::string& p); diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h index cb46e90085..ebe8cdf0f5 100644 --- a/libs/ardour/ardour/source.h +++ b/libs/ardour/ardour/source.h @@ -64,7 +64,7 @@ class Source : public SessionObject virtual framecnt_t length (framepos_t pos) const = 0; virtual void update_length (framepos_t pos, framecnt_t cnt) = 0; - virtual const Glib::ustring& path() const = 0; + virtual const std::string& path() const = 0; virtual framepos_t natural_position() const { return 0; } diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h index f3f9c4182c..1eab554178 100644 --- a/libs/ardour/ardour/utils.h +++ b/libs/ardour/ardour/utils.h @@ -39,7 +39,7 @@ bool string_is_affirmative (const std::string&); class XMLNode; -Glib::ustring legalize_for_path (Glib::ustring str); +std::string legalize_for_path (const std::string& str); XMLNode* find_named_node (const XMLNode& node, std::string name); std::string bool_as_string (bool); @@ -56,11 +56,11 @@ std::string bump_name_once(const std::string& s, char delimiter); int cmp_nocase (const std::string& s, const std::string& s2); -int touch_file(Glib::ustring path); +int touch_file(std::string path); -Glib::ustring path_expand (Glib::ustring); -Glib::ustring region_name_from_path (Glib::ustring path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0); -bool path_is_paired (Glib::ustring path, Glib::ustring& pair_base); +std::string path_expand (std::string); +std::string region_name_from_path (std::string path, bool strip_channels, bool add_channel_suffix = false, uint32_t total = 0, uint32_t this_one = 0); +bool path_is_paired (std::string path, std::string& pair_base); void compute_equal_power_fades (ARDOUR::nframes_t nframes, float* in, float* out); |