remove Glib::ustring from libardour; allow any characters except '/' and '\' in paths...
[ardour.git] / libs / ardour / export_handler.cc
index a9335add37c362e7c5e5bbea4cad457a84e8570e..05fa1d881dbf30fdd8eb950ed0d8d58a574f2f5b 100644 (file)
@@ -35,6 +35,8 @@
 #include "ardour/export_filename.h"
 #include "ardour/export_failed.h"
 
+#include "i18n.h"
+
 using namespace std;
 using namespace PBD;
 
@@ -104,7 +106,9 @@ ExportHandler::ExportHandler (Session & session)
   , graph_builder (new ExportGraphBuilder (session))
   , export_status (session.get_export_status ())
   , realtime (false)
-
+  , normalizing (false)
+  , cue_tracknum (0)
+  , cue_indexnum (0)
 {
 }
 
@@ -114,9 +118,9 @@ ExportHandler::~ExportHandler ()
 }
 
 bool
-ExportHandler::add_export_config (TimespanPtr timespan, ChannelConfigPtr channel_config, FormatPtr format, FilenamePtr filename)
+ExportHandler::add_export_config (TimespanPtr timespan, ChannelConfigPtr channel_config, FormatPtr format, FilenamePtr filename, boost::shared_ptr<AudioGrapher::BroadcastInfo> broadcast_info)
 {
-       FileSpec spec (channel_config, format, filename);
+       FileSpec spec (channel_config, format, filename, broadcast_info);
        ConfigPair pair (timespan, spec);
        config_map.insert (pair);
        
@@ -288,7 +292,7 @@ ExportHandler::export_cd_marker_file (TimespanPtr timespan, FormatPtr file_forma
        Locations::LocationList temp;
 
        for (i = locations.begin(); i != locations.end(); ++i) {
-               if ((*i)->start() >= timespan->get_start() && (*i)->end() <= timespan->get_end() && (*i)->is_cd_marker() && !(*i)->is_end()) {
+               if ((*i)->start() >= timespan->get_start() && (*i)->end() <= timespan->get_end() && (*i)->is_cd_marker() && !(*i)->is_session_range()) {
                        temp.push_back (*i);
                }
        }
@@ -360,7 +364,7 @@ ExportHandler::export_cd_marker_file (TimespanPtr timespan, FormatPtr file_forma
 void
 ExportHandler::write_cue_header (CDMarkerStatus & status)
 {
-       Glib::ustring title = status.timespan->name().compare ("Session") ? status.timespan->name() : (Glib::ustring) session.name();
+       string title = status.timespan->name().compare ("Session") ? status.timespan->name() : (string) session.name();
 
        status.out << "REM Cue file generated by Ardour" << endl;
        status.out << "TITLE \"" << title << "\"" << endl;
@@ -384,7 +388,7 @@ ExportHandler::write_cue_header (CDMarkerStatus & status)
        status.out << "FILE \"" << Glib::path_get_basename(status.filename) << "\" ";
        if (!status.format->format_name().compare ("WAV")) {
                status.out  << "WAVE";
-       } else if (status.format->format_name() == ExportFormatBase::F_RAW &&
+       } else if (status.format->format_id() == ExportFormatBase::F_RAW &&
                   status.format->sample_format() == ExportFormatBase::SF_16 &&
                   status.format->sample_rate() == ExportFormatBase::SR_44_1) {
                // Format is RAW 16bit 44.1kHz
@@ -403,7 +407,7 @@ ExportHandler::write_cue_header (CDMarkerStatus & status)
 void
 ExportHandler::write_toc_header (CDMarkerStatus & status)
 {
-       Glib::ustring title = status.timespan->name().compare ("Session") ? status.timespan->name() : (Glib::ustring) session.name();
+       string title = status.timespan->name().compare ("Session") ? status.timespan->name() : (string) session.name();
 
        status.out << "CD_DA" << endl;
        status.out << "CD_TEXT {" << endl << "  LANGUAGE_MAP {" << endl << "    0 : EN" << endl << "  }" << endl;