changeset 258:857ce6ecb163 piper-nopiper

Align Sonic Annotator with the new Piper-ified subrepos (bearing in mind we want neither Piper nor the plugin load checker in Sonic Annotator itself)
author Chris Cannam
date Fri, 04 Nov 2016 14:16:01 +0000
parents 46d3a6461b4a
children 382f33b7f00e
files .hgsub .hgsubstate runner/FeatureExtractionManager.cpp runner/MultiplexedReader.cpp runner/MultiplexedReader.h
diffstat 5 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsub	Fri Nov 04 14:13:11 2016 +0000
+++ b/.hgsub	Fri Nov 04 14:16:01 2016 +0000
@@ -2,3 +2,4 @@
 svcore = https://code.soundsoftware.ac.uk/hg/svcore
 dataquay = https://bitbucket.org/breakfastquay/dataquay
 sv-dependency-builds = https://code.soundsoftware.ac.uk/hg/sv-dependency-builds
+piper-cpp = https://code.soundsoftware.ac.uk/hg/piper-cpp
--- a/.hgsubstate	Fri Nov 04 14:13:11 2016 +0000
+++ b/.hgsubstate	Fri Nov 04 14:16:01 2016 +0000
@@ -1,4 +1,5 @@
 896aefe629c85b05ae0880ec93a396b9e3a5a304 dataquay
+ca39a12af53b71e13596a930b828eb1a920238e4 piper-cpp
 1e4f338ae482429a7ab9bdd0825242042354152f sv-dependency-builds
-16955f929d377f80412f86f7f51e104749993d38 svcore
-4101e3f80aa0f2b352577e85c9af1568bc290612 vamp-plugin-sdk
+d45a16c232bd391e6493a160cd1afcabf252191a svcore
+8e846c1aed96189f020024cdadd0d37bf69d3e3a vamp-plugin-sdk
--- a/runner/FeatureExtractionManager.cpp	Fri Nov 04 14:13:11 2016 +0000
+++ b/runner/FeatureExtractionManager.cpp	Fri Nov 04 14:16:01 2016 +0000
@@ -835,7 +835,7 @@
         //!!! inefficient, although much of the inefficiency may be
         // susceptible to compiler optimisation
         
-        SampleBlock frames = reader->getInterleavedFrames(i, m_blockSize);
+        auto frames = reader->getInterleavedFrames(i, m_blockSize);
         
         // We have to do our own channel handling here; we can't just
         // leave it to the plugin adapter because the same plugin
--- a/runner/MultiplexedReader.cpp	Fri Nov 04 14:13:11 2016 +0000
+++ b/runner/MultiplexedReader.cpp	Fri Nov 04 14:16:01 2016 +0000
@@ -49,18 +49,18 @@
     }
 }
 
-SampleBlock
+std::vector<float>
 MultiplexedReader::getInterleavedFrames(sv_frame_t start, sv_frame_t frameCount) const
 {
     int out_chans = m_readers.size();
 
     // Allocate and zero
-    SampleBlock block(frameCount * out_chans, 0.f);
+    std::vector<float> block(frameCount * out_chans, 0.f);
 
     for (int out_chan = 0; out_chan < out_chans; ++out_chan) {
 
 	AudioFileReader *reader = m_readers[out_chan];
-	SampleBlock readerBlock = reader->getInterleavedFrames(start, frameCount);
+	auto readerBlock = reader->getInterleavedFrames(start, frameCount);
 
 	int in_chans = reader->getChannelCount();
 
--- a/runner/MultiplexedReader.h	Fri Nov 04 14:13:11 2016 +0000
+++ b/runner/MultiplexedReader.h	Fri Nov 04 14:16:01 2016 +0000
@@ -30,14 +30,15 @@
     MultiplexedReader(QList<AudioFileReader *> readers);
     virtual ~MultiplexedReader();
 
-    virtual QString getError() const { return m_error; }
-    virtual bool isQuicklySeekable() const { return m_quicklySeekable; }
+    virtual QString getError() const override { return m_error; }
+    virtual bool isQuicklySeekable() const override { return m_quicklySeekable; }
 
-    virtual SampleBlock getInterleavedFrames(sv_frame_t start, sv_frame_t count) const;
+    virtual std::vector<float> getInterleavedFrames
+    (sv_frame_t start, sv_frame_t count) const override;
 
-    virtual int getDecodeCompletion() const;
+    virtual int getDecodeCompletion() const override;
 
-    virtual bool isUpdating() const;
+    virtual bool isUpdating() const override;
 
 protected:
     QString m_error;