Monkey's Audio: Don't call "tag" program, if there is *no* meta-data to be embedded, because it will fail (bug probably existed since MAC encoding support was added)

Nero AAC: Don't call neroAacTag, if there is *no* meta-data to be embedded (neroAacTag doesn't fail in this case, but it would be a pointless call anyway)
This commit is contained in:
LoRd_MuldeR 2015-10-24 13:43:25 +02:00
parent 2db74fad61
commit 5d3ff699da
6 changed files with 105 additions and 58 deletions

View File

@ -34,6 +34,7 @@
<nav id="TOC">
<ul>
<li><a href="#lamexp-v4.xx-history"><span class="toc-section-number">1</span> LameXP v4.xx History</a><ul>
<li><a href="#lamexp-v4.13-xxxx-xx-xx">LameXP v4.13 [xxxx-xx-xx]</a></li>
<li><a href="#lamexp-v4.12-2015-10-23">LameXP v4.12 [2015-10-23]</a></li>
<li><a href="#lamexp-v4.11-2015-04-05">LameXP v4.11 [2015-04-05]</a></li>
<li><a href="#lamexp-v4.10-2014-06-23">LameXP v4.10 [2014-06-23]</a></li>
@ -80,6 +81,11 @@
</ul>
</nav>
<h1 id="lamexp-v4.xx-history"><span class="header-section-number">1</span> LameXP v4.xx History</h1>
<h2 id="lamexp-v4.13-xxxx-xx-xx" class="unnumbered">LameXP v4.13 [xxxx-xx-xx]</h2>
<ul>
<li>Upgraded build environment to Microsoft Visual Studio 2015<br /></li>
<li>Fixed creation of Monkey's Audio (APE) files, when <strong>no</strong> meta data is being embedded</li>
</ul>
<h2 id="lamexp-v4.12-2015-10-23" class="unnumbered">LameXP v4.12 [2015-10-23]</h2>
<ul>
<li>Upgraded build environment to Microsoft Visual Studio 2013 with Update-5<br /></li>

View File

@ -2,6 +2,11 @@
# LameXP v4.xx History #
## LameXP v4.13 [xxxx-xx-xx] ## {-}
* Upgraded build environment to Microsoft Visual Studio 2015
* Fixed creation of Monkey's Audio (APE) files, when **no** meta data is being embedded
## LameXP v4.12 [2015-10-23] ## {-}
* Upgraded build environment to Microsoft Visual Studio 2013 with Update-5

View File

@ -285,6 +285,11 @@ bool AACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo
return false;
}
if(metaInfo.empty(false))
{
return true;
}
emit messageLogged("\n-------------------------------\n");
args.clear();

View File

@ -216,6 +216,11 @@ bool MACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo
return false;
}
if(metaInfo.empty(true))
{
return true;
}
emit messageLogged("\n-------------------------------\n");
args.clear();

View File

@ -155,6 +155,29 @@ void AudioFileModel_MetaInfo::print(void) const
PRINT_U(m_position);
}
bool AudioFileModel_MetaInfo::empty(const bool &ignoreArtwork) const
{
bool isEmpty = true;
if(!m_titel.isEmpty()) isEmpty = false;
if(!m_artist.isEmpty()) isEmpty = false;
if(!m_album.isEmpty()) isEmpty = false;
if(!m_genre.isEmpty()) isEmpty = false;
if(!m_comment.isEmpty()) isEmpty = false;
if(m_year) isEmpty = false;
if(m_position) isEmpty = false;
if(!ignoreArtwork)
{
if(!m_cover.isEmpty())
{
isEmpty = false;
}
}
return isEmpty;
}
///////////////////////////////////////////////////////////////////////////////
// Audio File - Technical Info
///////////////////////////////////////////////////////////////////////////////

View File

@ -62,6 +62,9 @@ public:
inline void setYear(const unsigned int year) { m_year = year; }
inline void setPosition(const unsigned int position) { m_position = position; }
//Is empty?
bool empty(const bool &ignoreArtwork) const;
//Reset
void reset(void);