diff data/fileio/WavFileReader.h @ 1041:843f67be0ed9 cxx11

Replace the get*Frames calls in AudioFileReader with less stupid API
author Chris Cannam
date Wed, 04 Mar 2015 12:30:41 +0000
parents cc27f35aa75c
children 4d9816ba0ebe
line wrap: on
line diff
--- a/data/fileio/WavFileReader.h	Wed Mar 04 12:01:04 2015 +0000
+++ b/data/fileio/WavFileReader.h	Wed Mar 04 12:30:41 2015 +0000
@@ -50,8 +50,7 @@
      * Must be safe to call from multiple threads with different
      * arguments on the same object at the same time.
      */
-    virtual void getInterleavedFrames(sv_frame_t start, sv_frame_t count,
-				      SampleBlock &frames) const;
+    virtual SampleBlock getInterleavedFrames(sv_frame_t start, sv_frame_t count) const;
     
     static void getSupportedExtensions(std::set<QString> &extensions);
     static bool supportsExtension(QString ext);
@@ -76,7 +75,7 @@
     bool m_seekable;
 
     mutable QMutex m_mutex;
-    mutable float *m_buffer;
+    mutable SampleBlock m_buffer;
     mutable sv_frame_t m_bufsiz;
     mutable sv_frame_t m_lastStart;
     mutable sv_frame_t m_lastCount;