aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/opus/decoderopusfactory.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-06-08 20:59:57 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-06-08 20:59:57 +0000
commitce79cbc21b6559f54d11da95fef7364616c3d872 (patch)
treefabf04494ba44e2b08a7d74842064727858a4d03 /src/plugins/Input/opus/decoderopusfactory.cpp
parentc8488b0a00f62504667eb9d3a6f4074e1f424980 (diff)
downloadqmmp-ce79cbc21b6559f54d11da95fef7364616c3d872.tar.gz
qmmp-ce79cbc21b6559f54d11da95fef7364616c3d872.tar.bz2
qmmp-ce79cbc21b6559f54d11da95fef7364616c3d872.zip
optimization
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8007 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/opus/decoderopusfactory.cpp')
-rw-r--r--src/plugins/Input/opus/decoderopusfactory.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/Input/opus/decoderopusfactory.cpp b/src/plugins/Input/opus/decoderopusfactory.cpp
index 859175beb..d24d57a79 100644
--- a/src/plugins/Input/opus/decoderopusfactory.cpp
+++ b/src/plugins/Input/opus/decoderopusfactory.cpp
@@ -65,11 +65,10 @@ QList<TrackInfo *> DecoderOpusFactory::createPlayList(const QString &path, Track
{
TrackInfo *info = new TrackInfo(path);
- TagLib::Ogg::Opus::File fileRef(QStringToFileName(path));
-
+ if(parts == TrackInfo::NoParts)
+ return QList<TrackInfo*>() << info;
- if(fileRef.audioProperties())
- info->setDuration(fileRef.audioProperties()->lengthInMilliseconds());
+ TagLib::Ogg::Opus::File fileRef(QStringToFileName(path));
if((parts & TrackInfo::MetaData) && fileRef.tag() && !fileRef.tag()->isEmpty())
{
@@ -88,8 +87,9 @@ QList<TrackInfo *> DecoderOpusFactory::createPlayList(const QString &path, Track
info->setValue(Qmmp::BITRATE, fileRef.audioProperties()->bitrate());
info->setValue(Qmmp::SAMPLERATE, fileRef.audioProperties()->sampleRate());
info->setValue(Qmmp::CHANNELS, fileRef.audioProperties()->channels());
- info->setValue(Qmmp::BITS_PER_SAMPLE, 16);
- info->setValue(Qmmp::FORMAT_NAME, "Ogg Vorbis");
+ info->setValue(Qmmp::BITS_PER_SAMPLE, 32); //float
+ info->setValue(Qmmp::FORMAT_NAME, "Ogg Opus");
+ info->setDuration(fileRef.audioProperties()->lengthInMilliseconds());
}
if((parts & TrackInfo::ReplayGainInfo) && fileRef.tag() && !fileRef.tag()->isEmpty())