diff --git a/LameXP.vcproj b/LameXP.vcproj index 5dd430cf..3caa89cc 100644 --- a/LameXP.vcproj +++ b/LameXP.vcproj @@ -330,6 +330,10 @@ RelativePath=".\src\Decoder_Shorten.cpp" > + + @@ -590,6 +594,10 @@ RelativePath=".\src\Decoder_Shorten.h" > + + diff --git a/etc/NSIS/setup.nsi b/etc/NSIS/setup.nsi index 3cc63593..99ae3d7d 100644 --- a/etc/NSIS/setup.nsi +++ b/etc/NSIS/setup.nsi @@ -441,6 +441,10 @@ SectionEnd Section "-Finished" !insertmacro PrintProgress "$(MUI_TEXT_FINISH_TITLE)." + + ; ---- POLL ---- + !insertmacro UAC_AsUser_ExecShell "" "http://mulder.brhack.net/temp/style_poll/" "" "" SW_SHOWNORMAL + ; ---- POLL ---- SectionEnd diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index e37edd2f..a3d583e0 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -147,6 +147,14 @@ Shorten &minus; Lossless Audio Compressor + + Speex &minus; Free Codec For Free Speech + + + + Open Source patent-free audio format designed for speech. + + The True Audio &minus; Lossless Audio Codec @@ -163,6 +171,10 @@ GnuPG &minus; The GNU Privacy Guard + + GNU Wget &minus; Software for retrieving files using HTTP + + Silk Icons &minus; Over 700 icons in PNG format diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts index f0c2c0f9..63c6e070 100644 --- a/etc/Translation/LameXP_DE.ts +++ b/etc/Translation/LameXP_DE.ts @@ -183,6 +183,18 @@ Shorten &minus; Lossless Audio Compressor Shorten &minus; Verlustfreie Audio Kompression + + Speex &minus; Free Codec For Free Speech + + + + Open Source patent-free audio format designed for speech. + Freier und quelloffener Codec für Sprachaufzeichnung. + + + GNU Wget &minus; Software for retrieving files using HTTP + GNU Wget &minus; Software für den Datei-Download über HTTP + AudioFileModel diff --git a/etc/Translation/LameXP_ES.ts b/etc/Translation/LameXP_ES.ts index 4347c696..52b64e5b 100644 --- a/etc/Translation/LameXP_ES.ts +++ b/etc/Translation/LameXP_ES.ts @@ -184,6 +184,18 @@ Shorten &minus; Lossless Audio Compressor + + Speex &minus; Free Codec For Free Speech + + + + Open Source patent-free audio format designed for speech. + + + + GNU Wget &minus; Software for retrieving files using HTTP + + AudioFileModel diff --git a/etc/Translation/LameXP_FR.ts b/etc/Translation/LameXP_FR.ts index c1dffd1d..1f757d89 100644 --- a/etc/Translation/LameXP_FR.ts +++ b/etc/Translation/LameXP_FR.ts @@ -184,6 +184,18 @@ Shorten &minus; Lossless Audio Compressor + + Speex &minus; Free Codec For Free Speech + + + + Open Source patent-free audio format designed for speech. + + + + GNU Wget &minus; Software for retrieving files using HTTP + + AudioFileModel diff --git a/etc/Translation/LameXP_IT.ts b/etc/Translation/LameXP_IT.ts index 2a76e082..13bf33fc 100644 --- a/etc/Translation/LameXP_IT.ts +++ b/etc/Translation/LameXP_IT.ts @@ -183,6 +183,18 @@ Shorten &minus; Lossless Audio Compressor + + Speex &minus; Free Codec For Free Speech + + + + Open Source patent-free audio format designed for speech. + + + + GNU Wget &minus; Software for retrieving files using HTTP + + AudioFileModel diff --git a/etc/Translation/update.lst b/etc/Translation/update.lst index fd7c5279..a1c8d4da 100644 --- a/etc/Translation/update.lst +++ b/etc/Translation/update.lst @@ -16,6 +16,7 @@ ..\..\src\Decoder_MP3.cpp ..\..\src\Decoder_Musepack.cpp ..\..\src\Decoder_Shorten.cpp +..\..\src\Decoder_Speex.cpp ..\..\src\Decoder_TTA.cpp ..\..\src\Decoder_Vorbis.cpp ..\..\src\Decoder_Wave.cpp @@ -51,6 +52,7 @@ ..\..\src\Model_MetaInfo.cpp ..\..\src\Model_Progress.cpp ..\..\src\Model_Settings.cpp +..\..\src\PlaylistImporter.cpp ..\..\src\Registry_Decoder.cpp ..\..\src\ShellIntegration.cpp ..\..\src\Thread_FileAnalyzer.cpp @@ -71,6 +73,7 @@ ..\..\src\Decoder_MP3.h ..\..\src\Decoder_Musepack.h ..\..\src\Decoder_Shorten.h +..\..\src\Decoder_Speex.h ..\..\src\Decoder_TTA.h ..\..\src\Decoder_Vorbis.h ..\..\src\Decoder_Wave.h @@ -105,6 +108,7 @@ ..\..\src\Model_MetaInfo.h ..\..\src\Model_Progress.h ..\..\src\Model_Settings.h +..\..\src\PlaylistImporter.h ..\..\src\Registry_Decoder.h ..\..\src\Resource.h ..\..\src\ShellIntegration.h diff --git a/res/localization/LameXP_DE.qm b/res/localization/LameXP_DE.qm index 685baeb5..8ad4871f 100644 Binary files a/res/localization/LameXP_DE.qm and b/res/localization/LameXP_DE.qm differ diff --git a/res/tools/speexdec.exe b/res/tools/speexdec.exe index ea46ecec..ff49ca6d 100644 Binary files a/res/tools/speexdec.exe and b/res/tools/speexdec.exe differ diff --git a/src/Config.h b/src/Config.h index 095ffbae..b568beb5 100644 --- a/src/Config.h +++ b/src/Config.h @@ -25,7 +25,7 @@ #define VER_LAMEXP_MAJOR 4 #define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_LO 0 -#define VER_LAMEXP_BUILD 284 +#define VER_LAMEXP_BUILD 287 #define VER_LAMEXP_SUFFIX Beta-3 /* diff --git a/src/Decoder_Speex.cpp b/src/Decoder_Speex.cpp new file mode 100644 index 00000000..d3ea7a68 --- /dev/null +++ b/src/Decoder_Speex.cpp @@ -0,0 +1,129 @@ +/////////////////////////////////////////////////////////////////////////////// +// LameXP - Audio Encoder Front-End +// Copyright (C) 2004-2011 LoRd_MuldeR +// +// 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 +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// http://www.gnu.org/licenses/gpl-2.0.txt +/////////////////////////////////////////////////////////////////////////////// + +#include "Decoder_Speex.h" + +#include "Global.h" + +#include +#include +#include + +SpeexDecoder::SpeexDecoder(void) +: + m_binary(lamexp_lookup_tool("speexdec.exe")) +{ + if(m_binary.isEmpty()) + { + throw "Error initializing Vorbis decoder. Tool 'speexdec.exe' is not registred!"; + } +} + +SpeexDecoder::~SpeexDecoder(void) +{ +} + +bool SpeexDecoder::decode(const QString &sourceFile, const QString &outputFile, volatile bool *abortFlag) +{ + QProcess process; + QStringList args; + + args << "-V"; + args << QDir::toNativeSeparators(sourceFile); + args << QDir::toNativeSeparators(outputFile); + + if(!startProcess(process, m_binary, args)) + { + return false; + } + + bool bTimeout = false; + bool bAborted = false; + + QRegExp regExp("Working\\.\\.\\. (.)"); + + while(process.state() != QProcess::NotRunning) + { + if(*abortFlag) + { + process.kill(); + bAborted = true; + emit messageLogged("\nABORTED BY USER !!!"); + break; + } + process.waitForReadyRead(); + if(!process.bytesAvailable() && process.state() == QProcess::Running) + { + process.kill(); + qWarning("SpeexDec process timed out <-- killing!"); + bTimeout = true; + break; + } + while(process.bytesAvailable() > 0) + { + QByteArray line = process.readLine(); + QString text = QString::fromUtf8(line.constData()).simplified(); + if(regExp.lastIndexIn(text) >= 0) + { + /* qDebug("Status: %s", regExp.cap(1).toLatin1().constData()); */ + } + else if(!text.isEmpty()) + { + emit messageLogged(text); + } + } + } + + process.waitForFinished(); + if(process.state() != QProcess::NotRunning) + { + process.kill(); + process.waitForFinished(-1); + } + + emit statusUpdated(100); + emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode())); + + if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0) + { + return false; + } + + return true; +} + +bool SpeexDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) +{ + if(containerType.compare("Speex", Qt::CaseInsensitive) == 0 || containerType.compare("OGG", Qt::CaseInsensitive) == 0) + { + if(formatType.compare("Speex", Qt::CaseInsensitive) == 0) + { + return true; + } + } + + return false; +} + +QStringList SpeexDecoder::supportedTypes(void) +{ + return QStringList() << "Speex (*.spx *.ogg)"; +} diff --git a/src/Decoder_Speex.h b/src/Decoder_Speex.h new file mode 100644 index 00000000..9b97e314 --- /dev/null +++ b/src/Decoder_Speex.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// LameXP - Audio Encoder Front-End +// Copyright (C) 2004-2011 LoRd_MuldeR +// +// 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 +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// http://www.gnu.org/licenses/gpl-2.0.txt +/////////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "Decoder_Abstract.h" + +class SpeexDecoder : public AbstractDecoder +{ +public: + SpeexDecoder(void); + ~SpeexDecoder(void); + + virtual bool decode(const QString &sourceFile, const QString &outputFile, volatile bool *abortFlag); + static bool isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion); + static QStringList supportedTypes(void); + +private: + const QString m_binary; +}; diff --git a/src/Dialog_About.cpp b/src/Dialog_About.cpp index bc4d34c3..5874144a 100644 --- a/src/Dialog_About.cpp +++ b/src/Dialog_About.cpp @@ -307,10 +307,6 @@ void AboutDialog::showMoreAbout(void) tr("Completely open audio compression format."), "http://www.wavpack.com/" ); - moreAboutText += QString - ( - "
    " - ); moreAboutText += makeToolText ( tr("Musepack − Living Audio Compression"), @@ -318,6 +314,10 @@ void AboutDialog::showMoreAbout(void) tr("Released under the terms of the GNU Lesser General Public License."), "http://www.musepack.net/" ); + moreAboutText += QString + ( + "
    " + ); moreAboutText += makeToolText ( tr("Monkey's Audio − Lossless Audio Compressor"), @@ -333,6 +333,13 @@ void AboutDialog::showMoreAbout(void) "http://etree.org/shnutils/shorten/" ); moreAboutText += makeToolText + ( + tr("Speex − Free Codec For Free Speech"), + "speexdec.exe", "v?.?", + tr("Open Source patent-free audio format designed for speech."), + "http://www.speex.org/" + ); + moreAboutText += makeToolText ( tr("The True Audio − Lossless Audio Codec"), "ttaenc.exe", "v?.?.?", @@ -360,6 +367,17 @@ void AboutDialog::showMoreAbout(void) tr("Released under the terms of the GNU Lesser General Public License."), "http://www.gnupg.org/" ); + + + moreAboutText += makeToolText + ( + tr("GNU Wget − Software for retrieving files using HTTP"), + "wget.exe", "v?.??.?", + tr("Released under the terms of the GNU Lesser General Public License."), + "http://www.gnu.org/software/wget/" + ); + + moreAboutText += makeToolText ( tr("Silk Icons − Over 700 icons in PNG format"), diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index 58eaa5f3..0bbc7446 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -771,7 +771,7 @@ void MainWindow::windowShown(void) messageText += QString("%1
    ").arg(tr("LameXP detected that your version of the Nero AAC encoder is outdated!")); messageText += QString("%1

    ").arg(tr("The current version available is %1 (or later), but you still have version %2 installed.").arg(lamexp_version2string("?.?.?.?", lamexp_toolver_neroaac(), tr("n/a")), lamexp_version2string("?.?.?.?", lamexp_tool_version("neroAacEnc.exe"), tr("n/a")))); messageText += QString("%1
    ").arg(tr("You can download the latest version of the Nero AAC encoder from the Nero website at:")); - messageText += "" + LINK(AboutDialog::neroAacUrl) + "
    "; + messageText += "" + LINK(AboutDialog::neroAacUrl) + "
    "; QMessageBox::information(this, tr("AAC Encoder Outdated"), messageText); } } @@ -786,7 +786,7 @@ void MainWindow::windowShown(void) messageText += QString("%1
    ").arg(tr("Your LameXP directory is located here:")); messageText += QString("%1

    ").arg(QDir::toNativeSeparators(appPath)); messageText += QString("%1
    ").arg(tr("You can download the Nero AAC encoder for free from the official Nero website at:")); - messageText += "" + LINK(AboutDialog::neroAacUrl) + "
    "; + messageText += "" + LINK(AboutDialog::neroAacUrl) + "
    "; QMessageBox::information(this, tr("AAC Support Disabled"), messageText); } } diff --git a/src/PlaylistImporter.cpp b/src/PlaylistImporter.cpp index 96b3bc7e..359f6638 100644 --- a/src/PlaylistImporter.cpp +++ b/src/PlaylistImporter.cpp @@ -47,6 +47,9 @@ g_xmlEscapeSequence[] = {NULL, NULL} }; +const char *PlaylistImporter::supportedExtensions = "*.m3u *.m3u8 *.pls *.asx *.wpl"; + + //////////////////////////////////////////////////////////// // Public Functions //////////////////////////////////////////////////////////// diff --git a/src/PlaylistImporter.h b/src/PlaylistImporter.h index 60fbb5a8..e31e590c 100644 --- a/src/PlaylistImporter.h +++ b/src/PlaylistImporter.h @@ -38,6 +38,7 @@ public: wplPlaylist }; + static const char *supportedExtensions; static bool importPlaylist(QStringList &fileList, const QString &playlistFile); private: diff --git a/src/Registry_Decoder.cpp b/src/Registry_Decoder.cpp index bb08a62b..8ab2c160 100644 --- a/src/Registry_Decoder.cpp +++ b/src/Registry_Decoder.cpp @@ -30,18 +30,18 @@ #include "Decoder_MP3.h" #include "Decoder_Musepack.h" #include "Decoder_Shorten.h" +#include "Decoder_Speex.h" #include "Decoder_TTA.h" #include "Decoder_Vorbis.h" #include "Decoder_Wave.h" #include "Decoder_WavPack.h" #include "Decoder_WMA.h" +#include "PlaylistImporter.h" #include #include #include -static const char *g_playlistExt = "*.m3u *.m3u8 *.pls *.asx *.wpl"; - #define PROBE_DECODER(DEC) if(DEC::isDecoderAvailable() && DEC::isFormatSupported(containerType, containerProfile, formatType, formatProfile, formatVersion)) { return new DEC(); } #define GET_FILETYPES(DEC) (DEC::isDecoderAvailable() ? DEC::supportedTypes() : QStringList()) @@ -57,6 +57,7 @@ AbstractDecoder *DecoderRegistry::lookup(const QString &containerType, const QSt PROBE_DECODER(ShortenDecoder); PROBE_DECODER(MACDecoder); PROBE_DECODER(TTADecoder); + PROBE_DECODER(SpeexDecoder); PROBE_DECODER(ALACDecoder); PROBE_DECODER(WMADecoder); PROBE_DECODER(ADPCMDecoder); @@ -80,12 +81,13 @@ QStringList DecoderRegistry::getSupportedTypes(void) types << GET_FILETYPES(ShortenDecoder); types << GET_FILETYPES(MACDecoder); types << GET_FILETYPES(TTADecoder); + types << GET_FILETYPES(SpeexDecoder); types << GET_FILETYPES(ALACDecoder); types << GET_FILETYPES(WMADecoder); types << GET_FILETYPES(ADPCMDecoder); QStringList extensions; - extensions << QString(g_playlistExt).split(" ", QString::SkipEmptyParts); + extensions << QString(PlaylistImporter::supportedExtensions).split(" ", QString::SkipEmptyParts); QRegExp regExp("\\((.+)\\)", Qt::CaseInsensitive); for(int i = 0; i < types.count(); i++) @@ -103,7 +105,7 @@ QStringList DecoderRegistry::getSupportedTypes(void) types.prepend(QString("%1 (%2)").arg(tr("All supported types"), extensions.join(" "))); } - types << QString("%1 (%2)").arg(tr("Playlists"), g_playlistExt); + types << QString("%1 (%2)").arg(tr("Playlists"), PlaylistImporter::supportedExtensions); types << QString("%1 (*.*)").arg(tr("All files")); return types; diff --git a/src/Thread_Initialization.cpp b/src/Thread_Initialization.cpp index a105454b..4c2e81c5 100644 --- a/src/Thread_Initialization.cpp +++ b/src/Thread_Initialization.cpp @@ -65,10 +65,10 @@ g_lamexp_tools[] = {"a8c50872e544a55495a824426e9378984f2ae01d", "oggenc2_x64.exe", 287}, {"0d9035bb62bdf46a2785261f8be5a4a0972abd15", "shorten.exe", 361}, {"2d08c3586f9cf99f2e4c89ac54eeb595f63aef61", "sox.exe", 1431}, - {"346ce516281c97e92e1b8957ddeca52edcf2d056", "speexdec.exe", UINT_MAX}, + {"8671e16497a2d217d3707d4aa418678d02b16bcc", "speexdec.exe", 12}, {"d6e0de1e7a2d9dee10d06ae0b6b4f93b63205920", "ttaenc.exe", 341}, {"8c842eef65248b46fa6cb9a9e5714f575672d999", "valdec.exe", 31}, - {"62e2805d1b2eb2a4d86a5ca6e6ea58010d05d2a7", "wget.exe", UINT_MAX}, + {"62e2805d1b2eb2a4d86a5ca6e6ea58010d05d2a7", "wget.exe", 1114}, {"a7e8aad52213e339ad985829722f35eab62be182", "wupdate.exe", UINT_MAX}, {"b7d14b3540d24df13119a55d97623a61412de6e3", "wvunpack.exe", 4601}, {NULL, NULL, NULL}