summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_export_audio.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/editor_export_audio.cc')
-rw-r--r--gtk2_ardour/editor_export_audio.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc
index 43977f1577..ce7de29aa1 100644
--- a/gtk2_ardour/editor_export_audio.cc
+++ b/gtk2_ardour/editor_export_audio.cc
@@ -210,7 +210,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
try {
- fs = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createReadable (DataType::AUDIO, *session, path, AudioFileSource::Flag (0)));
+ fs = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createWritable (DataType::AUDIO, *session, path, false, session->frame_rate()));
}
catch (failed_constructor& err) {
@@ -258,6 +258,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
for (vector<boost::shared_ptr<AudioFileSource> >::iterator src = sources.begin(); src != sources.end(); ++src) {
(*src)->update_header (0, *now, tnow);
+ (*src)->mark_immutable ();
}
return true;
@@ -343,7 +344,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
path = s;
try {
- fs = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createReadable (DataType::AUDIO, *session, path, AudioFileSource::Flag (0)));
+ fs = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createWritable (DataType::AUDIO, *session, path, false, session->frame_rate()));
}
catch (failed_constructor& err) {
@@ -416,8 +417,9 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
time (&tnow);
now = localtime (&tnow);
- for (uint32_t n=0; n < channels; ++n) {
- sources[n]->update_header (0, *now, tnow);
+ for (vector<boost::shared_ptr<AudioFileSource> >::iterator s = sources.begin(); s != sources.end(); ++s) {
+ (*s)->update_header (0, *now, tnow);
+ (*s)->mark_immutable ();
// do we need to ref it again?
}