merge with master and fix 4 conflicts by hand
[ardour.git] / libs / ardour / export_graph_builder.cc
index 301914b0ae0b6ae70cd0f3a36d6f3f4b8d32a944..2c0c44033d1bab3cf50dc542fb18836e3ae61860 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "ardour/export_graph_builder.h"
 
+#include <vector>
+
 #include <glibmm/miscutils.h>
 
 #include "audiographer/process_context.h"
@@ -317,8 +319,8 @@ ExportGraphBuilder::Normalizer::Normalizer (ExportGraphBuilder & parent, FileSpe
 {
        std::string tmpfile_path = parent.session.session_directory().export_path();
        tmpfile_path = Glib::build_filename(tmpfile_path, "XXXXXX");
-       char tmpfile_path_buf[tmpfile_path.size() + 1];
-       std::copy(tmpfile_path.begin(), tmpfile_path.end(), tmpfile_path_buf);
+       std::vector<char> tmpfile_path_buf(tmpfile_path.size() + 1);
+       std::copy(tmpfile_path.begin(), tmpfile_path.end(), tmpfile_path_buf.begin());
        tmpfile_path_buf[tmpfile_path.size()] = '\0';
 
        config = new_config;
@@ -334,7 +336,7 @@ ExportGraphBuilder::Normalizer::Normalizer (ExportGraphBuilder & parent, FileSpe
        normalizer->add_output (threader);
 
        int format = ExportFormatBase::F_RAW | ExportFormatBase::SF_Float;
-       tmp_file.reset (new TmpFile<float> (tmpfile_path_buf, format, channels, config.format->sample_rate()));
+       tmp_file.reset (new TmpFile<float> (&tmpfile_path_buf[0], format, channels, config.format->sample_rate()));
        tmp_file->FileWritten.connect_same_thread (post_processing_connection,
                                                   boost::bind (&Normalizer::start_post_processing, this));