diff data/fileio/CodedAudioFileReader.cpp @ 1326:54af1e21705c 3.0-integration

Update to use bqvec allocator for float vectors
author Chris Cannam
date Tue, 13 Dec 2016 15:23:21 +0000
parents 4dbb7a7c9c28
children 5b04b8bc88ca
line wrap: on
line diff
--- a/data/fileio/CodedAudioFileReader.cpp	Tue Dec 13 12:03:48 2016 +0000
+++ b/data/fileio/CodedAudioFileReader.cpp	Tue Dec 13 15:23:21 2016 +0000
@@ -289,7 +289,7 @@
 }
 
 void
-CodedAudioFileReader::addSamplesToDecodeCache(const vector<float> &samples)
+CodedAudioFileReader::addSamplesToDecodeCache(const floatvec_t &samples)
 {
     QMutexLocker locker(&m_cacheMutex);
 
@@ -526,7 +526,7 @@
     }
 }
 
-vector<float>
+floatvec_t
 CodedAudioFileReader::getInterleavedFrames(sv_frame_t start, sv_frame_t count) const
 {
     // Lock is only required in CacheInMemory mode (the cache file
@@ -538,7 +538,7 @@
         return {};
     }
 
-    vector<float> frames;
+    floatvec_t frames;
     
     switch (m_cacheMode) {
 
@@ -564,7 +564,7 @@
         sv_frame_t n = sv_frame_t(m_data.size());
         if (ix0 > n) ix0 = n;
         if (ix1 > n) ix1 = n;
-        frames = vector<float>(m_data.begin() + ix0, m_data.begin() + ix1);
+        frames = floatvec_t(m_data.begin() + ix0, m_data.begin() + ix1);
         m_dataLock.unlock();
         break;
     }