# HG changeset patch # User Chris Cannam # Date 1547746209 0 # Node ID 2f8ee436e85874cc0a908f9358e1759c553e7b14 # Parent 99afceeb1a450b8377dbafcfeb9879f8191fd40f# Parent 0773b34d987f67b2463b298a27387d9505d50c2a Merge diff -r 99afceeb1a45 -r 2f8ee436e858 data/fileio/BQAFileReader.cpp --- 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() diff -r 99afceeb1a45 -r 2f8ee436e858 data/fileio/BQAFileReader.h --- 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 &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; diff -r 99afceeb1a45 -r 2f8ee436e858 data/fileio/test/EncodingTest.h --- 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 =