diff data/fileio/MatrixFile.cpp @ 548:1469caaa8e67

* Finer locking in fft caches; fix displayed bin ranges in spectrogram
author Chris Cannam
date Thu, 05 Feb 2009 12:05:28 +0000
parents 806e3c72b5df
children 107d3f3705c9
line wrap: on
line diff
--- a/data/fileio/MatrixFile.cpp	Wed Feb 04 20:39:11 2009 +0000
+++ b/data/fileio/MatrixFile.cpp	Thu Feb 05 12:05:28 2009 +0000
@@ -68,7 +68,7 @@
     std::cerr << "MatrixFile::MatrixFile(" << fileBase.toStdString() << ", " << int(mode) << ", " << cellSize << ", " << width << ", " << height << ")" << std::endl;
 #endif
 
-    QMutexLocker locker(&m_createMutex);
+    m_createMutex.lock();
 
     QDir tempDir(TempDirectory::getInstance()->getPath());
     QString fileName(tempDir.filePath(QString("%1.mfc").arg(fileBase)));
@@ -113,6 +113,8 @@
         throw FailedToOpenFile(fileName);
     }
 
+    m_createMutex.unlock();
+
 #ifdef DEBUG_MATRIX_FILE
     std::cerr << "MatrixFile(" << this << ")::MatrixFile: fd is " << m_fd << std::endl;
 #endif