From 30551864faa07405c5b9d7fc4cfbf2649210f7fc Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Mon, 10 Aug 2015 12:00:23 +0900 Subject: [PATCH] Fix debug messages in AudioProperties classes. --- taglib/ape/apeproperties.cpp | 10 +++++----- taglib/flac/flacproperties.cpp | 2 +- taglib/mpc/mpcproperties.cpp | 12 ++++++------ taglib/mpeg/mpegproperties.cpp | 4 ++-- taglib/ogg/opus/opusproperties.cpp | 4 ++-- taglib/ogg/speex/speexproperties.cpp | 6 +++--- taglib/ogg/vorbis/vorbisproperties.cpp | 8 ++++---- taglib/riff/aiff/aiffproperties.cpp | 8 ++++---- taglib/riff/wav/wavproperties.cpp | 12 ++++++------ taglib/trueaudio/trueaudioproperties.cpp | 6 +++--- taglib/wavpack/wavpackproperties.cpp | 4 ++-- 11 files changed, 38 insertions(+), 38 deletions(-) diff --git a/taglib/ape/apeproperties.cpp b/taglib/ape/apeproperties.cpp index 7716ad68..dfc3dea9 100644 --- a/taglib/ape/apeproperties.cpp +++ b/taglib/ape/apeproperties.cpp @@ -149,7 +149,7 @@ void APE::AudioProperties::read(File *file, offset_t streamLength) } if(version < 0) { - debug("APE::Properties::read() -- APE descriptor not found"); + debug("APE::AudioProperties::read() -- APE descriptor not found"); return; } @@ -173,7 +173,7 @@ void APE::AudioProperties::analyzeCurrent(File *file) file->seek(2, File::Current); const ByteVector descriptor = file->readBlock(44); if(descriptor.size() < 44) { - debug("APE::Properties::analyzeCurrent() -- descriptor is too short."); + debug("APE::AudioProperties::analyzeCurrent() -- descriptor is too short."); return; } @@ -185,7 +185,7 @@ void APE::AudioProperties::analyzeCurrent(File *file) // Read the header const ByteVector header = file->readBlock(24); if(header.size() < 24) { - debug("APE::Properties::analyzeCurrent() -- MAC header is too short."); + debug("APE::AudioProperties::analyzeCurrent() -- MAC header is too short."); return; } @@ -207,7 +207,7 @@ void APE::AudioProperties::analyzeOld(File *file) { const ByteVector header = file->readBlock(26); if(header.size() < 26) { - debug("APE::Properties::analyzeOld() -- MAC header is too short."); + debug("APE::AudioProperties::analyzeOld() -- MAC header is too short."); return; } @@ -237,7 +237,7 @@ void APE::AudioProperties::analyzeOld(File *file) file->seek(16, File::Current); const ByteVector fmt = file->readBlock(28); if(fmt.size() < 28 || !fmt.startsWith("WAVEfmt ")) { - debug("APE::Properties::analyzeOld() -- fmt header is too short."); + debug("APE::AudioProperties::analyzeOld() -- fmt header is too short."); return; } diff --git a/taglib/flac/flacproperties.cpp b/taglib/flac/flacproperties.cpp index 55b1a7ee..e5c3e65d 100644 --- a/taglib/flac/flacproperties.cpp +++ b/taglib/flac/flacproperties.cpp @@ -124,7 +124,7 @@ ByteVector FLAC::AudioProperties::signature() const void FLAC::AudioProperties::read(const ByteVector &data, offset_t streamLength) { if(data.size() < 18) { - debug("FLAC::Properties::read() - FLAC properties must contain at least 18 bytes."); + debug("FLAC::AudioProperties::read() - FLAC properties must contain at least 18 bytes."); return; } diff --git a/taglib/mpc/mpcproperties.cpp b/taglib/mpc/mpcproperties.cpp index 74c08cb5..f982630e 100644 --- a/taglib/mpc/mpcproperties.cpp +++ b/taglib/mpc/mpcproperties.cpp @@ -213,7 +213,7 @@ void MPC::AudioProperties::readSV8(File *file, offset_t streamLength) bool eof; const size_t packetSize = readSize(file, packetSizeLength, eof); if(eof) { - debug("MPC::Properties::readSV8() - Reached to EOF."); + debug("MPC::AudioProperties::readSV8() - Reached to EOF."); break; } @@ -221,7 +221,7 @@ void MPC::AudioProperties::readSV8(File *file, offset_t streamLength) const ByteVector data = file->readBlock(dataSize); if(data.size() != dataSize) { - debug("MPC::Properties::readSV8() - dataSize doesn't match the actual data size."); + debug("MPC::AudioProperties::readSV8() - dataSize doesn't match the actual data size."); break; } @@ -230,7 +230,7 @@ void MPC::AudioProperties::readSV8(File *file, offset_t streamLength) // http://trac.musepack.net/wiki/SV8Specification#StreamHeaderPacket if(dataSize <= 5) { - debug("MPC::Properties::readSV8() - \"SH\" packet is too short to parse."); + debug("MPC::AudioProperties::readSV8() - \"SH\" packet is too short to parse."); break; } @@ -242,13 +242,13 @@ void MPC::AudioProperties::readSV8(File *file, offset_t streamLength) d->sampleFrames = readSize(data, pos); if(pos > dataSize - 3) { - debug("MPC::Properties::readSV8() - \"SH\" packet is corrupt."); + debug("MPC::AudioProperties::readSV8() - \"SH\" packet is corrupt."); break; } const ulong begSilence = readSize(data, pos); if(pos > dataSize - 2) { - debug("MPC::Properties::readSV8() - \"SH\" packet is corrupt."); + debug("MPC::AudioProperties::readSV8() - \"SH\" packet is corrupt."); break; } @@ -270,7 +270,7 @@ void MPC::AudioProperties::readSV8(File *file, offset_t streamLength) // http://trac.musepack.net/wiki/SV8Specification#ReplaygainPacket if(dataSize <= 9) { - debug("MPC::Properties::readSV8() - \"RG\" packet is too short to parse."); + debug("MPC::AudioProperties::readSV8() - \"RG\" packet is too short to parse."); break; } diff --git a/taglib/mpeg/mpegproperties.cpp b/taglib/mpeg/mpegproperties.cpp index 9d0abe41..7640a38f 100644 --- a/taglib/mpeg/mpegproperties.cpp +++ b/taglib/mpeg/mpegproperties.cpp @@ -154,7 +154,7 @@ void MPEG::AudioProperties::read(File *file) const offset_t first = file->firstFrameOffset(); if(first < 0) { - debug("MPEG::Properties::read() -- Could not find a valid first MPEG frame in the stream."); + debug("MPEG::AudioProperties::read() -- Could not find a valid first MPEG frame in the stream."); return; } @@ -162,7 +162,7 @@ void MPEG::AudioProperties::read(File *file) const Header firstHeader(file->readBlock(4)); if(!firstHeader.isValid()) { - debug("MPEG::Properties::read() -- The first page header is invalid."); + debug("MPEG::AudioProperties::read() -- The first page header is invalid."); return; } diff --git a/taglib/ogg/opus/opusproperties.cpp b/taglib/ogg/opus/opusproperties.cpp index 3e01eb02..7758c82f 100644 --- a/taglib/ogg/opus/opusproperties.cpp +++ b/taglib/ogg/opus/opusproperties.cpp @@ -167,10 +167,10 @@ void Opus::AudioProperties::read(File *file) } } else { - debug("Opus::Properties::read() -- The PCM values for the start or " + debug("Opus::AudioProperties::read() -- The PCM values for the start or " "end of this file was incorrect."); } } else - debug("Opus::Properties::read() -- Could not find valid first and last Ogg pages."); + debug("Opus::AudioProperties::read() -- Could not find valid first and last Ogg pages."); } diff --git a/taglib/ogg/speex/speexproperties.cpp b/taglib/ogg/speex/speexproperties.cpp index 72e85f5b..0a61fca3 100644 --- a/taglib/ogg/speex/speexproperties.cpp +++ b/taglib/ogg/speex/speexproperties.cpp @@ -126,7 +126,7 @@ void Speex::AudioProperties::read(File *file) const ByteVector data = file->packet(0); if(data.size() < 64) { - debug("Speex::Properties::read() -- data is too short."); + debug("Speex::AudioProperties::read() -- data is too short."); return; } @@ -186,12 +186,12 @@ void Speex::AudioProperties::read(File *file) } } else { - debug("Speex::Properties::read() -- Either the PCM values for the start or " + debug("Speex::AudioProperties::read() -- Either the PCM values for the start or " "end of this file was incorrect or the sample rate is zero."); } } else - debug("Speex::Properties::read() -- Could not find valid first and last Ogg pages."); + debug("Speex::AudioProperties::read() -- Could not find valid first and last Ogg pages."); // Alternative to the actual average bitrate. diff --git a/taglib/ogg/vorbis/vorbisproperties.cpp b/taglib/ogg/vorbis/vorbisproperties.cpp index 6dc13f0e..ad899eb9 100644 --- a/taglib/ogg/vorbis/vorbisproperties.cpp +++ b/taglib/ogg/vorbis/vorbisproperties.cpp @@ -149,14 +149,14 @@ void Ogg::Vorbis::AudioProperties::read(File *file) const ByteVector data = file->packet(0); if(data.size() < 28) { - debug("Vorbis::Properties::read() -- data is too short."); + debug("Ogg::Vorbis::AudioProperties::read() -- data is too short."); return; } size_t pos = 0; if(data.mid(pos, 7) != vorbisSetupHeaderID) { - debug("Ogg::Vorbis::Properties::read() -- invalid Ogg::Vorbis identification header"); + debug("Ogg::Vorbis::AudioProperties::read() -- invalid Ogg::Vorbis identification header"); return; } @@ -201,12 +201,12 @@ void Ogg::Vorbis::AudioProperties::read(File *file) } } else { - debug("Vorbis::Properties::read() -- Either the PCM values for the start or " + debug("Ogg::Vorbis::AudioProperties::read() -- Either the PCM values for the start or " "end of this file was incorrect or the sample rate is zero."); } } else - debug("Vorbis::Properties::read() -- Could not find valid first and last Ogg pages."); + debug("Ogg::Vorbis::AudioProperties::read() -- Could not find valid first and last Ogg pages."); // Alternative to the actual average bitrate. diff --git a/taglib/riff/aiff/aiffproperties.cpp b/taglib/riff/aiff/aiffproperties.cpp index a318f3ec..8f6f998e 100644 --- a/taglib/riff/aiff/aiffproperties.cpp +++ b/taglib/riff/aiff/aiffproperties.cpp @@ -148,23 +148,23 @@ void RIFF::AIFF::AudioProperties::read(File *file) if(data.isEmpty()) data = file->chunkData(i); else - debug("RIFF::AIFF::Properties::read() - Duplicate 'COMM' chunk found."); + debug("RIFF::AIFF::AudioProperties::read() - Duplicate 'COMM' chunk found."); } else if(name == "SSND") { if(streamLength == 0) streamLength = file->chunkDataSize(i) + file->chunkPadding(i); else - debug("RIFF::AIFF::Properties::read() - Duplicate 'SSND' chunk found."); + debug("RIFF::AIFF::AudioProperties::read() - Duplicate 'SSND' chunk found."); } } if(data.size() < 18) { - debug("RIFF::AIFF::Properties::read() - 'COMM' chunk not found or too short."); + debug("RIFF::AIFF::AudioProperties::read() - 'COMM' chunk not found or too short."); return; } if(streamLength == 0) { - debug("RIFF::AIFF::Properties::read() - 'SSND' chunk not found."); + debug("RIFF::AIFF::AudioProperties::read() - 'SSND' chunk not found."); return; } diff --git a/taglib/riff/wav/wavproperties.cpp b/taglib/riff/wav/wavproperties.cpp index 4df7b7b6..d6fe966e 100644 --- a/taglib/riff/wav/wavproperties.cpp +++ b/taglib/riff/wav/wavproperties.cpp @@ -144,35 +144,35 @@ void RIFF::WAV::AudioProperties::read(File *file) if(data.isEmpty()) data = file->chunkData(i); else - debug("RIFF::WAV::Properties::read() - Duplicate 'fmt ' chunk found."); + debug("RIFF::WAV::AudioProperties::read() - Duplicate 'fmt ' chunk found."); } else if(name == "data") { if(streamLength == 0) streamLength = file->chunkDataSize(i) + file->chunkPadding(i); else - debug("RIFF::WAV::Properties::read() - Duplicate 'data' chunk found."); + debug("RIFF::WAV::AudioProperties::read() - Duplicate 'data' chunk found."); } else if(name == "fact") { if(totalSamples == 0) totalSamples = file->chunkData(i).toUInt32LE(0); else - debug("RIFF::WAV::Properties::read() - Duplicate 'fact' chunk found."); + debug("RIFF::WAV::AudioProperties::read() - Duplicate 'fact' chunk found."); } } if(data.size() < 16) { - debug("RIFF::WAV::Properties::read() - 'fmt ' chunk not found or too short."); + debug("RIFF::WAV::AudioProperties::read() - 'fmt ' chunk not found or too short."); return; } if(streamLength == 0) { - debug("RIFF::WAV::Properties::read() - 'data' chunk not found."); + debug("RIFF::WAV::AudioProperties::read() - 'data' chunk not found."); return; } d->format = data.toUInt16LE(0); if(d->format != FORMAT_PCM && totalSamples == 0) { - debug("RIFF::WAV::Properties::read() - Non-PCM format, but 'fact' chunk not found."); + debug("RIFF::WAV::AudioProperties::read() - Non-PCM format, but 'fact' chunk not found."); return; } diff --git a/taglib/trueaudio/trueaudioproperties.cpp b/taglib/trueaudio/trueaudioproperties.cpp index 91e45801..38162b33 100644 --- a/taglib/trueaudio/trueaudioproperties.cpp +++ b/taglib/trueaudio/trueaudioproperties.cpp @@ -124,12 +124,12 @@ int TrueAudio::AudioProperties::ttaVersion() const void TrueAudio::AudioProperties::read(const ByteVector &data, offset_t streamLength) { if(data.size() < 4) { - debug("TrueAudio::Properties::read() -- data is too short."); + debug("TrueAudio::AudioProperties::read() -- data is too short."); return; } if(!data.startsWith("TTA")) { - debug("TrueAudio::Properties::read() -- invalid header signature."); + debug("TrueAudio::AudioProperties::read() -- invalid header signature."); return; } @@ -142,7 +142,7 @@ void TrueAudio::AudioProperties::read(const ByteVector &data, offset_t streamLen // TTA2 headers are in development, and have a different format if(1 == d->version) { if(data.size() < 18) { - debug("TrueAudio::Properties::read() -- data is too short."); + debug("TrueAudio::AudioProperties::read() -- data is too short."); return; } diff --git a/taglib/wavpack/wavpackproperties.cpp b/taglib/wavpack/wavpackproperties.cpp index 6d540b5f..659759af 100644 --- a/taglib/wavpack/wavpackproperties.cpp +++ b/taglib/wavpack/wavpackproperties.cpp @@ -162,12 +162,12 @@ void WavPack::AudioProperties::read(File *file, offset_t streamLength) const ByteVector data = file->readBlock(32); if(data.size() < 32) { - debug("WavPack::Properties::read() -- data is too short."); + debug("WavPack::AudioProperties::read() -- data is too short."); break; } if(!data.startsWith("wvpk")) { - debug("WavPack::Properties::read() -- Block header not found."); + debug("WavPack::AudioProperties::read() -- Block header not found."); break; }