Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adds support for reading wav,aiff id3v2 tags via taglib

  • Loading branch information...
commit fc541bd700940131584a85274723a465146203fc 1 parent 1c66978
Jonathan Marshall authored Jonathan Marshall committed
7 xbmc/music/tags/MusicInfoTagLoaderFactory.cpp
View
@@ -74,6 +74,8 @@ IMusicInfoTagLoader* CMusicInfoTagLoaderFactory::CreateLoader(const CStdString&
strExtension == "m4a" || strExtension == "mp4" ||
strExtension == "mpc" || strExtension == "mpp" || strExtension == "mp+" ||
strExtension == "ogg" || strExtension == "oga" || strExtension == "oggstream" ||
+ strExtension == "aif" || strExtension == "aiff" ||
+ strExtension == "wav" ||
#ifdef HAS_MOD_PLAYER
ModPlayer::IsSupportedFormat(strExtension) ||
strExtension == "mod" || strExtension == "nsf" || strExtension == "nsfstream" ||
@@ -96,11 +98,6 @@ IMusicInfoTagLoader* CMusicInfoTagLoaderFactory::CreateLoader(const CStdString&
CMusicInfoTagLoaderSHN *pTagLoader = new CMusicInfoTagLoaderSHN();
return (IMusicInfoTagLoader*)pTagLoader;
}
- else if (strExtension == "wav")
- {
- CMusicInfoTagLoaderWAV *pTagLoader = new CMusicInfoTagLoaderWAV();
- return (IMusicInfoTagLoader*)pTagLoader;
- }
else if (strExtension == "spc")
{
CMusicInfoTagLoaderSPC *pTagLoader = new CMusicInfoTagLoaderSPC();
10 xbmc/music/tags/TagLoaderTagLib.cpp
View
@@ -129,6 +129,8 @@ bool CTagLoaderTagLib::Load(const CStdString& strFileName, CMusicInfoTag& tag, c
TagLib::TrueAudio::File* ttaFile = NULL;
TagLib::WavPack::File* wvFile = NULL;
TagLib::XM::File* xmFile = NULL;
+ TagLib::RIFF::WAV::File * wavFile = NULL;
+ TagLib::RIFF::AIFF::File * aiffFile = NULL;
if (strExtension == "ape")
file = apeFile = new APE::File(stream);
@@ -154,6 +156,10 @@ bool CTagLoaderTagLib::Load(const CStdString& strFileName, CMusicInfoTag& tag, c
file = ttaFile = new TrueAudio::File(stream, ID3v2::FrameFactory::instance());
else if (strExtension == "wv")
file = wvFile = new WavPack::File(stream);
+ else if (strExtension == "aif" || strExtension == "aiff")
+ file = aiffFile = new RIFF::AIFF::File(stream);
+ else if (strExtension == "wav")
+ file = wavFile = new RIFF::WAV::File(stream);
else if (strExtension == "xm")
file = xmFile = new XM::File(stream);
else if (strExtension == "ogg")
@@ -208,6 +214,10 @@ bool CTagLoaderTagLib::Load(const CStdString& strFileName, CMusicInfoTag& tag, c
xiph = dynamic_cast<Ogg::XiphComment *>(oggVorbisFile->tag());
else if (ttaFile)
id3v2 = ttaFile->ID3v2Tag(false);
+ else if (aiffFile)
+ id3v2 = aiffFile->tag();
+ else if (wavFile)
+ id3v2 = wavFile->tag();
else if (wvFile)
ape = wvFile->APETag(false);
else if (mpcFile)
1  xbmc/music/tags/TagLoaderTagLib.h
View
@@ -35,6 +35,7 @@
#include <taglib/s3mfile.h>
#include <taglib/trueaudiofile.h>
#include <taglib/vorbisfile.h>
+#include <taglib/wavfile.h>
#include <taglib/wavpackfile.h>
#include <taglib/xmfile.h>
Please sign in to comment.
Something went wrong with that request. Please try again.