Add debug bit for AudioBackends for port related debug output
[ardour.git] / gtk2_ardour / editor_export_audio.cc
index 509e629aeeb80be3787c038553af83e3c2240d61..c2abbca85639e4e6d463aaa87a7a4dfa5fc90b65 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <gtkmm/messagedialog.h>
 
+#include <glib/gstdio.h>
+
 #include "gtkmm2ext/choice.h"
 
 #include "pbd/pthread_utils.h"
@@ -60,7 +62,7 @@ using namespace Gtk;
 void
 Editor::export_audio ()
 {
-       ExportDialog dialog (*this, _("Export"), X_("ExportProfile"));
+       ExportDialog dialog (*this, _("Export"), ExportProfileManager::RegularExport);
        dialog.set_session (_session);
        dialog.run();
 }
@@ -84,11 +86,11 @@ Editor::export_selection ()
 void
 Editor::export_range ()
 {
-       Marker* marker;
+       ArdourMarker* marker;
 
-       if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
+       if ((marker = reinterpret_cast<ArdourMarker *> (marker_menu_item->get_data ("marker"))) == 0) {
                fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
-               /*NOTREACHED*/
+               abort(); /*NOTREACHED*/
        }
 
        Location* l;
@@ -158,11 +160,11 @@ Editor::export_region ()
 
                        switch (ret) {
                        case Gtk::RESPONSE_ACCEPT:
-                               /* force unlink because the backend code will
+                               /* force ::g_unlink because the backend code will
                                   go wrong if it tries to open an existing
                                   file for writing.
                                */
-                               ::unlink (path.c_str());
+                               ::g_unlink (path.c_str());
                                break;
                        default:
                                return;
@@ -232,7 +234,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
        vector<boost::shared_ptr<AudioFileSource> > sources;
        uint32_t nchans;
 
-       const string sound_directory = _session->session_directory().sound_path().to_string();
+       const string sound_directory = _session->session_directory().sound_path();
 
        nchans = region->n_channels();
 
@@ -274,7 +276,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
                        try {
                                fs = boost::dynamic_pointer_cast<AudioFileSource> (
                                        SourceFactory::createWritable (DataType::AUDIO, *_session,
-                                                                      path, string(), true,
+                                                                      path, true,
                                                                       false, _session->frame_rate()));
                        }
 
@@ -382,7 +384,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
        string path;
        vector<boost::shared_ptr<AudioFileSource> > sources;
 
-       const string sound_directory = _session->session_directory().sound_path().to_string();
+       const string sound_directory = _session->session_directory().sound_path();
 
        uint32_t channels = count.n_audio();
 
@@ -413,7 +415,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
                try {
                        fs = boost::dynamic_pointer_cast<AudioFileSource> (
                                SourceFactory::createWritable (DataType::AUDIO, *_session,
-                                                              path, string(), true,
+                                                              path, true,
                                                               false, _session->frame_rate()));
                }