diff data/model/WaveFileModel.cpp @ 285:20028c634494

* change some QStrings to std::strings etc
author Chris Cannam
date Thu, 09 Aug 2007 16:29:29 +0000
parents 7802b0e2b0ff
children 7b96b3bd4bae
line wrap: on
line diff
--- a/data/model/WaveFileModel.cpp	Thu Aug 09 14:40:03 2007 +0000
+++ b/data/model/WaveFileModel.cpp	Thu Aug 09 16:29:29 2007 +0000
@@ -46,8 +46,8 @@
     m_lastFillExtent(0),
     m_exiting(false)
 {
-    m_reader = AudioFileReaderFactory::createReader(path);
-    setObjectName(m_reader->getTitle());
+    m_reader = AudioFileReaderFactory::createReader(path.toStdString());
+    setObjectName(m_reader->getTitle().c_str());
     if (objectName() == "") setObjectName(QFileInfo(path).fileName());
     if (isOK()) fillCache();
 }
@@ -60,8 +60,8 @@
     m_lastFillExtent(0),
     m_exiting(false)
 {
-    m_reader = AudioFileReaderFactory::createReader(path);
-    setObjectName(m_reader->getTitle());
+    m_reader = AudioFileReaderFactory::createReader(path.toStdString());
+    setObjectName(m_reader->getTitle().c_str());
     if (objectName() == "") setObjectName(QFileInfo(originalLocation).fileName());
     if (isOK()) fillCache();
 }
@@ -75,7 +75,7 @@
     m_exiting(false)
 {
     m_reader = reader;
-    setObjectName(m_reader->getTitle());
+    setObjectName(m_reader->getTitle().c_str());
     if (objectName() == "") setObjectName(QFileInfo(path).fileName());
     fillCache();
 }
@@ -171,7 +171,7 @@
 //              << start << ", " << end << "): calling reader" << std::endl;
 #endif
 
-    SampleBlock frames;
+    AudioFileReader::SampleBlock frames;
     m_reader->getInterleavedFrames(start, end - start, frames);
 
     size_t i = 0;
@@ -213,7 +213,7 @@
 
     if (!m_reader || !m_reader->isOK()) return 0;
 
-    SampleBlock frames;
+    AudioFileReader::SampleBlock frames;
     m_reader->getInterleavedFrames(start, end - start, frames);
 
     size_t i = 0;
@@ -272,7 +272,7 @@
 	// matter by putting a single cache in getInterleavedFrames
 	// for short queries.
 
-	SampleBlock frames;
+        AudioFileReader::SampleBlock frames;
 	m_reader->getInterleavedFrames(start, end - start, frames);
 	float max = 0.0, min = 0.0, total = 0.0;
 	size_t i = 0, count = 0;
@@ -478,7 +478,7 @@
     
     size_t frame = 0;
     size_t readBlockSize = 16384;
-    SampleBlock block;
+    AudioFileReader::SampleBlock block;
 
     if (!m_model.isOK()) return;