diff options
author | John Emmas <johne53@tiscali.co.uk> | 2013-08-04 15:17:19 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2013-08-04 15:17:19 +0100 |
commit | 07d94b9b4868fad26c9e8ac2ae4901849a09b8ac (patch) | |
tree | df4278a908166a81d65383b1171197172ca47131 /libs/ardour/export_graph_builder.cc | |
parent | fa59391f6a8b8bffbf07fc567d726c40424fe7f7 (diff) |
'libs/ardour' - Use 'std::vector' instead of dynamically sized arrays (required to be buildable with MSVC)
Diffstat (limited to 'libs/ardour/export_graph_builder.cc')
-rw-r--r-- | libs/ardour/export_graph_builder.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc index c7875c0b9b..127546e8fc 100644 --- a/libs/ardour/export_graph_builder.cc +++ b/libs/ardour/export_graph_builder.cc @@ -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)); |