diff data/fileio/WavFileReader.cpp @ 176:570794f6f6a7

* Some fixes to updating of writable wave file models
author Chris Cannam
date Tue, 03 Oct 2006 15:01:50 +0000
parents b0f4555b625e
children 89b05b679dc3
line wrap: on
line diff
--- a/data/fileio/WavFileReader.cpp	Tue Oct 03 14:17:37 2006 +0000
+++ b/data/fileio/WavFileReader.cpp	Tue Oct 03 15:01:50 2006 +0000
@@ -19,13 +19,14 @@
 
 #include <QMutexLocker>
 
-WavFileReader::WavFileReader(QString path) :
+WavFileReader::WavFileReader(QString path, bool fileUpdating) :
     m_file(0),
     m_path(path),
     m_buffer(0),
     m_bufsiz(0),
     m_lastStart(0),
-    m_lastCount(0)
+    m_lastCount(0),
+    m_updating(fileUpdating)
 {
     m_frameCount = 0;
     m_channelCount = 0;
@@ -80,7 +81,16 @@
 
     std::cerr << "WavFileReader::updateFrameCount: now " << m_fileInfo.frames << std::endl;
 
-    if (m_fileInfo.frames != prevCount) emit frameCountChanged();
+    m_frameCount = m_fileInfo.frames;
+
+    if (m_frameCount != prevCount) emit frameCountChanged();
+}
+
+void
+WavFileReader::updateDone()
+{
+    updateFrameCount();
+    m_updating = false;
 }
 
 void