diff data/model/WritableWaveFileModel.cpp @ 316:3a6725f285d6

* Make RemoteFile far more pervasive, and use it for local files as well so that we can handle both transparently. Make it shallow copy with reference counting, so it can be used by value without having to worry about the cache file lifetime. Use RemoteFile for MainWindow file-open functions, etc
author Chris Cannam
date Thu, 18 Oct 2007 15:31:20 +0000
parents 70a232b1f12a
children c324d410b096
line wrap: on
line diff
--- a/data/model/WritableWaveFileModel.cpp	Thu Oct 18 10:24:26 2007 +0000
+++ b/data/model/WritableWaveFileModel.cpp	Thu Oct 18 15:31:20 2007 +0000
@@ -60,7 +60,9 @@
         return;
     }
 
-    m_reader = new WavFileReader(m_writer->getPath(), true);
+    RemoteFile source(m_writer->getPath());
+
+    m_reader = new WavFileReader(source, true);
     if (!m_reader->getError().isEmpty()) {
         std::cerr << "WritableWaveFileModel: Error in creating wave file reader" << std::endl;
         delete m_reader;
@@ -68,7 +70,7 @@
         return;
     }
     
-    m_model = new WaveFileModel(m_writer->getPath(), m_reader);
+    m_model = new WaveFileModel(source, m_reader);
     if (!m_model->isOK()) {
         std::cerr << "WritableWaveFileModel: Error in creating wave file model" << std::endl;
         delete m_model;