OSDN Git Service

Updated Monkey's Audio binary to v4.11 (2013-01-20), including STDERR flush fix.
[lamexp/LameXP.git] / src / Encoder_Abstract.cpp
index bb83cce..cf6cb27 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2012 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -64,11 +64,28 @@ const unsigned int *AbstractEncoder::supportedBitdepths(void)
        return NULL;
 }
 
+//Does the encoder need the exact duration of the source?
+const bool AbstractEncoder::needsTimingInfo(void)
+{
+       return false;
+}
+
 /*
  * Helper functions
  */
+
+//Does this text contain Non-ASCII characters?
 bool AbstractEncoder::isUnicode(const QString &original)
 {
        QString asLatin1 = QString::fromLatin1(original.toLatin1().constData());
        return (wcscmp(QWCHAR(original), QWCHAR(asLatin1)) != 0);
 }
+
+//Remove "problematic" characters from tag
+QString AbstractEncoder::cleanTag(const QString &text)
+{
+       QString result(text);
+       result.replace(QChar('"'), "'");
+       result.replace(QChar('\\'), "/");
+       return result;
+}