changeset 1590:2f8ee436e858 bqaudiostream

Merge
author Chris Cannam
date Thu, 17 Jan 2019 17:30:09 +0000
parents 99afceeb1a45 (current diff) 0773b34d987f (diff)
children 6e68bd92ee21
files
diffstat 3 files changed, 18 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/BQAFileReader.cpp	Thu Jan 17 17:29:48 2019 +0000
+++ b/data/fileio/BQAFileReader.cpp	Thu Jan 17 17:30:09 2019 +0000
@@ -60,6 +60,8 @@
 
     m_channelCount = int(m_stream->getChannelCount());
     m_fileRate = sv_samplerate_t(m_stream->getSampleRate());
+    m_title = QString::fromUtf8(m_stream->getTrackName().c_str());
+    m_maker = QString::fromUtf8(m_stream->getArtistName().c_str());
 
     initialiseDecodeCache();
 
@@ -107,8 +109,6 @@
         m_decodeThread = new DecodeThread(this);
         m_decodeThread->start();
     }
-
-//!!! todo metadata - maker, title, tags
 }
 
 BQAFileReader::~BQAFileReader()
--- a/data/fileio/BQAFileReader.h	Thu Jan 17 17:29:48 2019 +0000
+++ b/data/fileio/BQAFileReader.h	Thu Jan 17 17:30:09 2019 +0000
@@ -41,20 +41,19 @@
                   ProgressReporter *reporter = 0);
     virtual ~BQAFileReader();
 
-    virtual QString getError() const { return m_error; }
-    virtual QString getLocation() const { return m_source.getLocation(); }
-    virtual QString getTitle() const { return m_title; }
-    virtual QString getMaker() const { return m_maker; }
-    virtual TagMap getTags() const { return m_tags; }
+    QString getError() const override { return m_error; }
+    QString getLocation() const override { return m_source.getLocation(); }
+    QString getTitle() const override { return m_title; }
+    QString getMaker() const override { return m_maker; }
     
     static void getSupportedExtensions(std::set<QString> &extensions);
     static bool supportsExtension(QString ext);
     static bool supportsContentType(QString type);
     static bool supports(FileSource &source);
 
-    virtual int getDecodeCompletion() const { return m_completion; }
+    int getDecodeCompletion() const override { return m_completion; }
 
-    virtual bool isUpdating() const {
+    bool isUpdating() const override {
         return m_decodeThread && m_decodeThread->isRunning();
     }
 
@@ -67,7 +66,6 @@
     QString m_error;
     QString m_title;
     QString m_maker;
-    TagMap m_tags;
 
     breakfastquay::AudioReadStream *m_stream;
 
--- a/data/fileio/test/EncodingTest.h	Thu Jan 17 17:29:48 2019 +0000
+++ b/data/fileio/test/EncodingTest.h	Thu Jan 17 17:30:09 2019 +0000
@@ -142,11 +142,11 @@
 
         } else {
 
-#if (!defined (HAVE_OGGZ) || !defined(HAVE_FISHSOUND))
-            if (extension == "ogg") {
-                QSKIP("Lack native Ogg Vorbis reader, so won't be getting metadata");
-            }
-#endif
+//#if (!defined (HAVE_OGGZ) || !defined(HAVE_FISHSOUND))
+//            if (extension == "ogg") {
+//                QSKIP("Lack native Ogg Vorbis reader, so won't be getting metadata");
+//            }
+//#endif
             
             auto blah = reader->getInterleavedFrames(0, 10);
             
@@ -215,11 +215,11 @@
             return;
         }
 
-#if (!defined (HAVE_OGGZ) || !defined(HAVE_FISHSOUND))
-        if (extension == "ogg") {
-            QSKIP("Lack native Ogg Vorbis reader, so won't be getting metadata");
-        }
-#endif
+//#if (!defined (HAVE_OGGZ) || !defined(HAVE_FISHSOUND))
+//        if (extension == "ogg") {
+//            QSKIP("Lack native Ogg Vorbis reader, so won't be getting metadata");
+//        }
+//#endif
 
         AudioFileReaderFactory::Parameters params;
         AudioFileReader *reader =