From 537ade07f6706857cad4b91edeb1b33029e5f298 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Fri, 19 Dec 2014 23:49:11 +0100 Subject: [PATCH] More code refactoring and clean-up. --- src/Config.h | 2 +- src/Decoder_AAC.cpp | 2 +- src/Decoder_AC3.cpp | 2 +- src/Decoder_ADPCM.cpp | 2 +- src/Decoder_ALAC.cpp | 2 +- src/Decoder_Avisynth.cpp | 2 +- src/Decoder_FLAC.cpp | 2 +- src/Decoder_MAC.cpp | 2 +- src/Decoder_MP3.cpp | 2 +- src/Decoder_Musepack.cpp | 2 +- src/Decoder_Opus.cpp | 2 +- src/Decoder_Shorten.cpp | 2 +- src/Decoder_Speex.cpp | 2 +- src/Decoder_TTA.cpp | 2 +- src/Decoder_Vorbis.cpp | 2 +- src/Decoder_WMA.cpp | 2 +- src/Decoder_WavPack.cpp | 2 +- src/Dialog_CueImport.cpp | 2 +- src/Dialog_MainWindow.cpp | 6 +- src/Dialog_Update.cpp | 8 +- src/Encoder_AAC.cpp | 6 +- src/Encoder_AAC_FHG.cpp | 4 +- src/Encoder_AAC_QAAC.cpp | 6 +- src/Encoder_AC3.cpp | 2 +- src/Encoder_DCA.cpp | 2 +- src/Encoder_FLAC.cpp | 2 +- src/Encoder_MAC.cpp | 4 +- src/Encoder_MP3.cpp | 2 +- src/Encoder_Opus.cpp | 2 +- src/Encoder_Vorbis.cpp | 2 +- src/Filter_Downmix.cpp | 2 +- src/Filter_Normalize.cpp | 2 +- src/Filter_Resample.cpp | 2 +- src/Filter_ToneAdjust.cpp | 2 +- src/Global.h | 90 +++++++++++++-------- src/Global_Tools.cpp | 13 ++-- src/Global_Utils.cpp | 80 ++++--------------- src/Global_Version.cpp | 130 ++++++++++++++++--------------- src/Global_Zero.cpp | 10 --- src/Model_FileList.cpp | 2 +- src/Model_Settings.cpp | 6 +- src/Registry_Encoder.cpp | 6 +- src/Thread_CueSplitter.cpp | 2 +- src/Thread_FileAnalyzer_Task.cpp | 4 +- src/Thread_Initialization.cpp | 14 ++-- src/Tool_WaveProperties.cpp | 2 +- 46 files changed, 208 insertions(+), 241 deletions(-) diff --git a/src/Config.h b/src/Config.h index e5e57fcf..a4d147b9 100644 --- a/src/Config.h +++ b/src/Config.h @@ -35,7 +35,7 @@ #define VER_LAMEXP_MINOR_LO 1 #define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_PATCH 9 -#define VER_LAMEXP_BUILD 1636 +#define VER_LAMEXP_BUILD 1638 #define VER_LAMEXP_CONFG 1558 /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Decoder_AAC.cpp b/src/Decoder_AAC.cpp index e9a4c5c2..9af6c0b6 100644 --- a/src/Decoder_AAC.cpp +++ b/src/Decoder_AAC.cpp @@ -35,7 +35,7 @@ AACDecoder::AACDecoder(void) : - m_binary(lamexp_lookup_tool("faad.exe")) + m_binary(lamexp_tool_lookup("faad.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_AC3.cpp b/src/Decoder_AC3.cpp index e8255a02..01adb7e0 100644 --- a/src/Decoder_AC3.cpp +++ b/src/Decoder_AC3.cpp @@ -35,7 +35,7 @@ AC3Decoder::AC3Decoder(void) : - m_binary(lamexp_lookup_tool("valdec.exe")) + m_binary(lamexp_tool_lookup("valdec.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_ADPCM.cpp b/src/Decoder_ADPCM.cpp index 5c0762f9..c3cba410 100644 --- a/src/Decoder_ADPCM.cpp +++ b/src/Decoder_ADPCM.cpp @@ -35,7 +35,7 @@ ADPCMDecoder::ADPCMDecoder(void) : - m_binary(lamexp_lookup_tool("sox.exe")) + m_binary(lamexp_tool_lookup("sox.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_ALAC.cpp b/src/Decoder_ALAC.cpp index 17b3f36c..ecdc438e 100644 --- a/src/Decoder_ALAC.cpp +++ b/src/Decoder_ALAC.cpp @@ -36,7 +36,7 @@ ALACDecoder::ALACDecoder(void) : - m_binary(lamexp_lookup_tool("refalac.exe")) + m_binary(lamexp_tool_lookup("refalac.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_Avisynth.cpp b/src/Decoder_Avisynth.cpp index e235f827..2c809a6f 100644 --- a/src/Decoder_Avisynth.cpp +++ b/src/Decoder_Avisynth.cpp @@ -36,7 +36,7 @@ AvisynthDecoder::AvisynthDecoder(void) : - m_binary(lamexp_lookup_tool("avs2wav.exe")) + m_binary(lamexp_tool_lookup("avs2wav.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_FLAC.cpp b/src/Decoder_FLAC.cpp index 5e634417..f7a7edab 100644 --- a/src/Decoder_FLAC.cpp +++ b/src/Decoder_FLAC.cpp @@ -35,7 +35,7 @@ FLACDecoder::FLACDecoder(void) : - m_binary(lamexp_lookup_tool("flac.exe")) + m_binary(lamexp_tool_lookup("flac.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_MAC.cpp b/src/Decoder_MAC.cpp index 34b1b0fd..36cd6077 100644 --- a/src/Decoder_MAC.cpp +++ b/src/Decoder_MAC.cpp @@ -35,7 +35,7 @@ MACDecoder::MACDecoder(void) : - m_binary(lamexp_lookup_tool("mac.exe")) + m_binary(lamexp_tool_lookup("mac.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_MP3.cpp b/src/Decoder_MP3.cpp index da6d9ead..9c31aaae 100644 --- a/src/Decoder_MP3.cpp +++ b/src/Decoder_MP3.cpp @@ -35,7 +35,7 @@ MP3Decoder::MP3Decoder(void) : - m_binary(lamexp_lookup_tool("mpg123.exe")) + m_binary(lamexp_tool_lookup("mpg123.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_Musepack.cpp b/src/Decoder_Musepack.cpp index 8c1f895c..32a7cdd5 100644 --- a/src/Decoder_Musepack.cpp +++ b/src/Decoder_Musepack.cpp @@ -36,7 +36,7 @@ MusepackDecoder::MusepackDecoder(void) : - m_binary(lamexp_lookup_tool("mpcdec.exe")) + m_binary(lamexp_tool_lookup("mpcdec.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_Opus.cpp b/src/Decoder_Opus.cpp index 60e9584c..8b76b699 100644 --- a/src/Decoder_Opus.cpp +++ b/src/Decoder_Opus.cpp @@ -38,7 +38,7 @@ bool OpusDecoder::m_disableResampling = false; OpusDecoder::OpusDecoder(void) : - m_binary(lamexp_lookup_tool("opusdec.exe")) + m_binary(lamexp_tool_lookup("opusdec.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_Shorten.cpp b/src/Decoder_Shorten.cpp index 4527187d..cae1cd76 100644 --- a/src/Decoder_Shorten.cpp +++ b/src/Decoder_Shorten.cpp @@ -36,7 +36,7 @@ ShortenDecoder::ShortenDecoder(void) : - m_binary(lamexp_lookup_tool("shorten.exe")) + m_binary(lamexp_tool_lookup("shorten.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_Speex.cpp b/src/Decoder_Speex.cpp index e5bc0857..c5b1d39a 100644 --- a/src/Decoder_Speex.cpp +++ b/src/Decoder_Speex.cpp @@ -35,7 +35,7 @@ SpeexDecoder::SpeexDecoder(void) : - m_binary(lamexp_lookup_tool("speexdec.exe")) + m_binary(lamexp_tool_lookup("speexdec.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_TTA.cpp b/src/Decoder_TTA.cpp index e42551fb..4b7e22c7 100644 --- a/src/Decoder_TTA.cpp +++ b/src/Decoder_TTA.cpp @@ -36,7 +36,7 @@ TTADecoder::TTADecoder(void) : - m_binary(lamexp_lookup_tool("tta.exe")) + m_binary(lamexp_tool_lookup("tta.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_Vorbis.cpp b/src/Decoder_Vorbis.cpp index 87425cde..87e798bd 100644 --- a/src/Decoder_Vorbis.cpp +++ b/src/Decoder_Vorbis.cpp @@ -35,7 +35,7 @@ VorbisDecoder::VorbisDecoder(void) : - m_binary(lamexp_lookup_tool("oggdec.exe")) + m_binary(lamexp_tool_lookup("oggdec.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_WMA.cpp b/src/Decoder_WMA.cpp index d9942a34..571b03eb 100644 --- a/src/Decoder_WMA.cpp +++ b/src/Decoder_WMA.cpp @@ -37,7 +37,7 @@ WMADecoder::WMADecoder(void) : - m_binary(lamexp_lookup_tool("wma2wav.exe")) + m_binary(lamexp_tool_lookup("wma2wav.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Decoder_WavPack.cpp b/src/Decoder_WavPack.cpp index f96372b8..36881612 100644 --- a/src/Decoder_WavPack.cpp +++ b/src/Decoder_WavPack.cpp @@ -35,7 +35,7 @@ WavPackDecoder::WavPackDecoder(void) : - m_binary(lamexp_lookup_tool("wvunpack.exe")) + m_binary(lamexp_tool_lookup("wvunpack.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Dialog_CueImport.cpp b/src/Dialog_CueImport.cpp index f9d25e6b..5a7ae70b 100644 --- a/src/Dialog_CueImport.cpp +++ b/src/Dialog_CueImport.cpp @@ -155,7 +155,7 @@ int CueImportDialog::exec(void) QStringList codecList; codecList.append(systemDefault); - codecList.append(lamexp_available_codepages()); + codecList.append(MUtils::available_codepages()); QInputDialog *input = new QInputDialog(progress); input->setLabelText(EXPAND(tr("Select ANSI Codepage for Cue Sheet file:"))); diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index e354f936..f025ef8e 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -625,7 +625,7 @@ MainWindow::MainWindow(MUtils::IPCChannel *const ipcChannel, FileListModel *cons ui->actionDisableNeroAacNotifications->setChecked(!m_settings->neroAacNotificationsEnabled()); ui->actionDisableSlowStartupNotifications->setChecked(!m_settings->antivirNotificationsEnabled()); ui->actionDisableShellIntegration->setChecked(!m_settings->shellIntegrationEnabled()); - ui->actionDisableShellIntegration->setDisabled(lamexp_portable_mode() && ui->actionDisableShellIntegration->isChecked()); + ui->actionDisableShellIntegration->setDisabled(lamexp_version_portable() && ui->actionDisableShellIntegration->isChecked()); ui->actionCheckForBetaUpdates->setChecked(m_settings->autoUpdateCheckBeta() || lamexp_version_demo()); ui->actionCheckForBetaUpdates->setEnabled(!lamexp_version_demo()); ui->actionHibernateComputer->setChecked(m_settings->hibernateComputer()); @@ -2178,7 +2178,7 @@ void MainWindow::disableShellIntegrationActionTriggered(bool checked) ui->actionDisableShellIntegration->setChecked(!m_settings->shellIntegrationEnabled()); - if(lamexp_portable_mode() && ui->actionDisableShellIntegration->isChecked()) + if(lamexp_version_portable() && ui->actionDisableShellIntegration->isChecked()) { ui->actionDisableShellIntegration->setEnabled(false); } @@ -4012,7 +4012,7 @@ void MainWindow::customParamsHelpRequested(QWidget *obj, QEvent *event) */ void MainWindow::showCustomParamsHelpScreen(const QString &toolName, const QString &command) { - const QString binary = lamexp_lookup_tool(toolName); + const QString binary = lamexp_tool_lookup(toolName); if(binary.isEmpty()) { MUtils::Sound::beep(MUtils::Sound::BEEP_ERR); diff --git a/src/Dialog_Update.cpp b/src/Dialog_Update.cpp index f8ff9d54..436a4479 100644 --- a/src/Dialog_Update.cpp +++ b/src/Dialog_Update.cpp @@ -82,10 +82,10 @@ UpdateDialog::UpdateDialog(const SettingsModel *const settings, QWidget *parent) m_firstShow(true), m_updateReadyToInstall(false), m_updaterProcess(NULL), - m_binaryUpdater(lamexp_lookup_tool("wupdate.exe")), - m_binaryWGet(lamexp_lookup_tool("wget.exe")), - m_binaryGnuPG(lamexp_lookup_tool("gpgv.exe")), - m_binaryKeys(lamexp_lookup_tool("gpgv.gpg")) + m_binaryUpdater(lamexp_tool_lookup("wupdate.exe")), + m_binaryWGet(lamexp_tool_lookup("wget.exe")), + m_binaryGnuPG(lamexp_tool_lookup("gpgv.exe")), + m_binaryKeys(lamexp_tool_lookup("gpgv.gpg")) { if(m_binaryUpdater.isEmpty()) { diff --git a/src/Encoder_AAC.cpp b/src/Encoder_AAC.cpp index cb215798..1130ed91 100644 --- a/src/Encoder_AAC.cpp +++ b/src/Encoder_AAC.cpp @@ -117,9 +117,9 @@ static const g_aacEncoderInfo; AACEncoder::AACEncoder(void) : - m_binary_enc(lamexp_lookup_tool("neroAacEnc.exe")), - m_binary_tag(lamexp_lookup_tool("neroAacTag.exe")), - m_binary_sox(lamexp_lookup_tool("sox.exe")) + m_binary_enc(lamexp_tool_lookup("neroAacEnc.exe")), + m_binary_tag(lamexp_tool_lookup("neroAacTag.exe")), + m_binary_sox(lamexp_tool_lookup("sox.exe")) { if(m_binary_enc.isEmpty() || m_binary_tag.isEmpty() || m_binary_sox.isEmpty()) { diff --git a/src/Encoder_AAC_FHG.cpp b/src/Encoder_AAC_FHG.cpp index f8b03601..8e53a64f 100644 --- a/src/Encoder_AAC_FHG.cpp +++ b/src/Encoder_AAC_FHG.cpp @@ -120,8 +120,8 @@ static const g_fhgAacEncoderInfo; FHGAACEncoder::FHGAACEncoder(void) : - m_binary_enc(lamexp_lookup_tool("fhgaacenc.exe")), - m_binary_dll(lamexp_lookup_tool("enc_fhgaac.dll")) + m_binary_enc(lamexp_tool_lookup("fhgaacenc.exe")), + m_binary_dll(lamexp_tool_lookup("enc_fhgaac.dll")) { if(m_binary_enc.isEmpty() || m_binary_dll.isEmpty()) { diff --git a/src/Encoder_AAC_QAAC.cpp b/src/Encoder_AAC_QAAC.cpp index 9143d11b..5523cfbe 100644 --- a/src/Encoder_AAC_QAAC.cpp +++ b/src/Encoder_AAC_QAAC.cpp @@ -128,9 +128,9 @@ static const g_qaacEncoderInfo; QAACEncoder::QAACEncoder(void) : - m_binary_qaac(lamexp_lookup_tool("qaac.exe")), - m_binary_soxr(lamexp_lookup_tool("libsoxr.dll")), - m_binary_soxc(lamexp_lookup_tool("libsoxconvolver.dll")) + m_binary_qaac(lamexp_tool_lookup("qaac.exe")), + m_binary_soxr(lamexp_tool_lookup("libsoxr.dll")), + m_binary_soxc(lamexp_tool_lookup("libsoxconvolver.dll")) { if(m_binary_qaac.isEmpty() || m_binary_soxr.isEmpty() || m_binary_soxc.isEmpty()) { diff --git a/src/Encoder_AC3.cpp b/src/Encoder_AC3.cpp index ee04dd93..7b9026c4 100644 --- a/src/Encoder_AC3.cpp +++ b/src/Encoder_AC3.cpp @@ -116,7 +116,7 @@ static const g_aftenEncoderInfo; AC3Encoder::AC3Encoder(void) : - m_binary(lamexp_lookup_tool("aften.exe")) + m_binary(lamexp_tool_lookup("aften.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Encoder_DCA.cpp b/src/Encoder_DCA.cpp index d517326a..6b0d134c 100644 --- a/src/Encoder_DCA.cpp +++ b/src/Encoder_DCA.cpp @@ -118,7 +118,7 @@ static const g_dcaEncoderInfo; DCAEncoder::DCAEncoder(void) : - m_binary(lamexp_lookup_tool("dcaenc.exe")) + m_binary(lamexp_tool_lookup("dcaenc.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Encoder_FLAC.cpp b/src/Encoder_FLAC.cpp index e58ca611..29afd8ae 100644 --- a/src/Encoder_FLAC.cpp +++ b/src/Encoder_FLAC.cpp @@ -112,7 +112,7 @@ static const g_flacEncoderInfo; FLACEncoder::FLACEncoder(void) : - m_binary(lamexp_lookup_tool("flac.exe")) + m_binary(lamexp_tool_lookup("flac.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Encoder_MAC.cpp b/src/Encoder_MAC.cpp index 16eb336a..c1c3ffd7 100644 --- a/src/Encoder_MAC.cpp +++ b/src/Encoder_MAC.cpp @@ -112,8 +112,8 @@ static const g_macEncoderInfo; MACEncoder::MACEncoder(void) : - m_binary_enc(lamexp_lookup_tool("mac.exe")), - m_binary_tag(lamexp_lookup_tool("tag.exe")) + m_binary_enc(lamexp_tool_lookup("mac.exe")), + m_binary_tag(lamexp_tool_lookup("tag.exe")) { if(m_binary_enc.isEmpty() || m_binary_tag.isEmpty()) { diff --git a/src/Encoder_MP3.cpp b/src/Encoder_MP3.cpp index 663c6cd1..8929457f 100644 --- a/src/Encoder_MP3.cpp +++ b/src/Encoder_MP3.cpp @@ -117,7 +117,7 @@ static const g_mp3EncoderInfo; MP3Encoder::MP3Encoder(void) : - m_binary(lamexp_lookup_tool("lame.exe")) + m_binary(lamexp_tool_lookup("lame.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Encoder_Opus.cpp b/src/Encoder_Opus.cpp index 82dc0965..c535df13 100644 --- a/src/Encoder_Opus.cpp +++ b/src/Encoder_Opus.cpp @@ -107,7 +107,7 @@ static const g_opusEncoderInfo; OpusEncoder::OpusEncoder(void) : - m_binary(lamexp_lookup_tool("opusenc.exe")) + m_binary(lamexp_tool_lookup("opusenc.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Encoder_Vorbis.cpp b/src/Encoder_Vorbis.cpp index c686cf17..fe62e226 100644 --- a/src/Encoder_Vorbis.cpp +++ b/src/Encoder_Vorbis.cpp @@ -114,7 +114,7 @@ static const g_vorbisEncoderInfo; VorbisEncoder::VorbisEncoder(void) : - m_binary(lamexp_lookup_tool("oggenc2.exe")) + m_binary(lamexp_tool_lookup("oggenc2.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Filter_Downmix.cpp b/src/Filter_Downmix.cpp index b8f6e528..212bef13 100644 --- a/src/Filter_Downmix.cpp +++ b/src/Filter_Downmix.cpp @@ -37,7 +37,7 @@ DownmixFilter::DownmixFilter(void) : - m_binary(lamexp_lookup_tool("sox.exe")) + m_binary(lamexp_tool_lookup("sox.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Filter_Normalize.cpp b/src/Filter_Normalize.cpp index 4708c597..be4c72a1 100644 --- a/src/Filter_Normalize.cpp +++ b/src/Filter_Normalize.cpp @@ -35,7 +35,7 @@ NormalizeFilter::NormalizeFilter(int peakVolume, int equalizationMode) : - m_binary(lamexp_lookup_tool("sox.exe")) + m_binary(lamexp_tool_lookup("sox.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Filter_Resample.cpp b/src/Filter_Resample.cpp index 3d1660f8..397f6c48 100644 --- a/src/Filter_Resample.cpp +++ b/src/Filter_Resample.cpp @@ -41,7 +41,7 @@ static __inline int multipleOf(int value, int base) ResampleFilter::ResampleFilter(int samplingRate, int bitDepth) : - m_binary(lamexp_lookup_tool("sox.exe")) + m_binary(lamexp_tool_lookup("sox.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Filter_ToneAdjust.cpp b/src/Filter_ToneAdjust.cpp index 2b49ed2c..7a55d45b 100644 --- a/src/Filter_ToneAdjust.cpp +++ b/src/Filter_ToneAdjust.cpp @@ -36,7 +36,7 @@ ToneAdjustFilter::ToneAdjustFilter(int bass, int treble) : - m_binary(lamexp_lookup_tool("sox.exe")) + m_binary(lamexp_tool_lookup("sox.exe")) { if(m_binary.isEmpty()) { diff --git a/src/Global.h b/src/Global.h index 7dad133d..d8d752ba 100644 --- a/src/Global.h +++ b/src/Global.h @@ -22,22 +22,23 @@ #pragma once +#ifdef _MSC_VER #define _CRT_RAND_S +#endif + #include +#include //Forward declarations -class QString; -class QStringList; class QDate; -class QTime; +class QStringList; class QIcon; -class QWidget; -class QProcess; -class QColor; class LockedFile; -enum QtMsgType; -//Variables +/////////////////////////////////////////////////////////////////////////////// +// GLOBAL CONSTANTS +/////////////////////////////////////////////////////////////////////////////// + extern const char* LAMEXP_DEFAULT_LANGID; extern const char* LAMEXP_DEFAULT_TRANSLATION; @@ -45,38 +46,61 @@ extern const char* LAMEXP_DEFAULT_TRANSLATION; // GLOBAL FUNCTIONS /////////////////////////////////////////////////////////////////////////////// -const QIcon &lamexp_app_icon(void); -QStringList lamexp_available_codepages(bool noAliases = true); -bool lamexp_check_tool(const QString &toolName); -void lamexp_finalization(void); -bool lamexp_install_translator(const QString &language); -bool lamexp_install_translator_from_file(const QString &qmFile); -const QString lamexp_lookup_tool(const QString &toolName); -const char *lamexp_mulders_url(void); -bool lamexp_portable_mode(void); +/* + * Translation Support + */ QStringList lamexp_query_translations(void); -void lamexp_register_tool(const QString &toolName, LockedFile *file, unsigned int version = 0, const QString *tag = NULL); -const char *lamexp_support_url(void); -unsigned int lamexp_tool_version(const QString &toolName, QString *tag = NULL); -unsigned int lamexp_toolver_coreaudio(void); -unsigned int lamexp_toolver_fhgaacenc(void); -unsigned int lamexp_toolver_neroaac(void); -unsigned int lamexp_toolver_qaacenc(void); -const char *lamexp_tracker_url(void); unsigned int lamexp_translation_country(const QString &langId); bool lamexp_translation_init(void); QString lamexp_translation_name(const QString &language); bool lamexp_translation_register(const QString &langId, const QString &qmFile, const QString &langName, unsigned int &systemId, unsigned int &country); unsigned int lamexp_translation_sysid(const QString &langId); -const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText, const QString *tag = NULL); -unsigned int lamexp_version_build(void); -unsigned int lamexp_version_confg(void); -bool lamexp_version_demo(void); -QDate lamexp_version_expires(void); -unsigned int lamexp_version_major(void); -unsigned int lamexp_version_minor(void); -const char *lamexp_version_release(void); +bool lamexp_install_translator(const QString &language); +bool lamexp_install_translator_from_file(const QString &qmFile); + +/* + * Tools Support + */ +bool lamexp_tool_check (const QString &toolName); +const QString& lamexp_tool_lookup (const QString &toolName); +void lamexp_tool_register(const QString &toolName, LockedFile *file, unsigned int version = 0, const QString *tag = NULL); +unsigned int lamexp_tool_version (const QString &toolName, QString *tag = NULL); + +/* + * Version getters + */ +unsigned int lamexp_version_major (void); +unsigned int lamexp_version_minor (void); +unsigned int lamexp_version_build (void); +unsigned int lamexp_version_confg (void); +const char* lamexp_version_release (void); +bool lamexp_version_portable (void); +bool lamexp_version_demo (void); +QDate& lamexp_version_expires (void); +unsigned int lamexp_toolver_neroaac (void); +unsigned int lamexp_toolver_fhgaacenc(void); +unsigned int lamexp_toolver_qaacenc (void); +unsigned int lamexp_toolver_coreaudio(void); + + +/* + * URL getters + */ const char *lamexp_website_url(void); +const char *lamexp_mulders_url(void); +const char *lamexp_support_url(void); +const char *lamexp_tracker_url(void); + +/* + * Misc Functions + */ +const QIcon& lamexp_app_icon(void); +const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText, const QString *tag = NULL); + +/* + * Finalization + */ +void lamexp_finalization(void); /////////////////////////////////////////////////////////////////////////////// // HELPER MACROS diff --git a/src/Global_Tools.cpp b/src/Global_Tools.cpp index 42dea177..7f2c9202 100644 --- a/src/Global_Tools.cpp +++ b/src/Global_Tools.cpp @@ -73,6 +73,9 @@ static struct } g_lamexp_currentTranslator; +//Null String +static const QString g_null; + /////////////////////////////////////////////////////////////////////////////// // GLOBAL FUNCTIONS /////////////////////////////////////////////////////////////////////////////// @@ -80,7 +83,7 @@ g_lamexp_currentTranslator; /* * Register tool */ -void lamexp_register_tool(const QString &toolName, LockedFile *file, unsigned int version, const QString *tag) +void lamexp_tool_register(const QString &toolName, LockedFile *file, unsigned int version, const QString *tag) { QWriteLocker writeLock(&g_lamexp_tools.lock); @@ -101,7 +104,7 @@ void lamexp_register_tool(const QString &toolName, LockedFile *file, unsigned in /* * Check for tool */ -bool lamexp_check_tool(const QString &toolName) +bool lamexp_tool_check(const QString &toolName) { QReadLocker readLock(&g_lamexp_tools.lock); return (g_lamexp_tools.registry) ? g_lamexp_tools.registry->contains(toolName.toLower()) : false; @@ -110,7 +113,7 @@ bool lamexp_check_tool(const QString &toolName) /* * Lookup tool path */ -const QString lamexp_lookup_tool(const QString &toolName) +const QString &lamexp_tool_lookup(const QString &toolName) { QReadLocker readLock(&g_lamexp_tools.lock); @@ -122,12 +125,12 @@ const QString lamexp_lookup_tool(const QString &toolName) } else { - return QString(); + return g_null; } } else { - return QString(); + return g_null; } } diff --git a/src/Global_Utils.cpp b/src/Global_Utils.cpp index 54e22bb1..b75ec82a 100644 --- a/src/Global_Utils.cpp +++ b/src/Global_Utils.cpp @@ -47,46 +47,13 @@ // GLOBAL VARS /////////////////////////////////////////////////////////////////////////////// -static struct -{ - QIcon *appIcon; - QReadWriteLock lock; -} -g_lamexp_app_icon; +static QScopedPointer g_lamexp_icon_data; +static QReadWriteLock g_lamexp_icon_lock; /////////////////////////////////////////////////////////////////////////////// // GLOBAL FUNCTIONS /////////////////////////////////////////////////////////////////////////////// -/* - * Get a list of all available Qt Text Codecs - */ -QStringList lamexp_available_codepages(bool noAliases) -{ - QStringList codecList; - - QList availableCodecs = QTextCodec::availableCodecs(); - while(!availableCodecs.isEmpty()) - { - QByteArray current = availableCodecs.takeFirst(); - if(!(current.startsWith("system") || current.startsWith("System"))) - { - codecList << QString::fromLatin1(current.constData(), current.size()); - if(noAliases) - { - if(QTextCodec *currentCodec = QTextCodec::codecForName(current.constData())) - { - - QList aliases = currentCodec->aliases(); - while(!aliases.isEmpty()) availableCodecs.removeAll(aliases.takeFirst()); - } - } - } - } - - return codecList; -} - /* * Computus according to H. Lichtenberg */ @@ -140,66 +107,47 @@ static bool lamexp_thanksgiving(const QDate &date) */ const QIcon &lamexp_app_icon(void) { - QReadLocker readLock(&g_lamexp_app_icon.lock); + QReadLocker readLock(&g_lamexp_icon_lock); //Already initialized? - if(g_lamexp_app_icon.appIcon) + if(!g_lamexp_icon_data.isNull()) { - return *g_lamexp_app_icon.appIcon; + return *g_lamexp_icon_data; } readLock.unlock(); - QWriteLocker writeLock(&g_lamexp_app_icon.lock); + QWriteLocker writeLock(&g_lamexp_icon_lock); - while(!g_lamexp_app_icon.appIcon) + while(g_lamexp_icon_data.isNull()) { QDate currentDate = QDate::currentDate(); QTime currentTime = QTime::currentTime(); if(lamexp_thanksgiving(currentDate)) { - g_lamexp_app_icon.appIcon = new QIcon(":/MainIcon6.png"); + g_lamexp_icon_data.reset(new QIcon(":/MainIcon6.png")); } else if(((currentDate.month() == 12) && (currentDate.day() == 31) && (currentTime.hour() >= 20)) || ((currentDate.month() == 1) && (currentDate.day() == 1) && (currentTime.hour() <= 19))) { - g_lamexp_app_icon.appIcon = new QIcon(":/MainIcon5.png"); + g_lamexp_icon_data.reset(new QIcon(":/MainIcon5.png")); } else if(((currentDate.month() == 10) && (currentDate.day() == 31) && (currentTime.hour() >= 12)) || ((currentDate.month() == 11) && (currentDate.day() == 1) && (currentTime.hour() <= 11))) { - g_lamexp_app_icon.appIcon = new QIcon(":/MainIcon4.png"); + g_lamexp_icon_data.reset(new QIcon(":/MainIcon4.png")); } else if((currentDate.month() == 12) && (currentDate.day() >= 24) && (currentDate.day() <= 26)) { - g_lamexp_app_icon.appIcon = new QIcon(":/MainIcon3.png"); + g_lamexp_icon_data.reset(new QIcon(":/MainIcon3.png")); } else if(lamexp_computus(currentDate)) { - g_lamexp_app_icon.appIcon = new QIcon(":/MainIcon2.png"); + g_lamexp_icon_data.reset(new QIcon(":/MainIcon2.png")); } else { - g_lamexp_app_icon.appIcon = new QIcon(":/MainIcon1.png"); + g_lamexp_icon_data.reset(new QIcon(":/MainIcon1.png")); } } - return *g_lamexp_app_icon.appIcon; -} - -/////////////////////////////////////////////////////////////////////////////// -// INITIALIZATION -/////////////////////////////////////////////////////////////////////////////// - -extern "C" void _lamexp_global_init_utils(void) -{ - MUTILS_ZERO_MEMORY(g_lamexp_app_icon); -} - -/////////////////////////////////////////////////////////////////////////////// -// FINALIZATION -/////////////////////////////////////////////////////////////////////////////// - -extern "C" void _lamexp_global_free_utils(void) -{ - //Free memory - MUTILS_DELETE(g_lamexp_app_icon.appIcon); + return *g_lamexp_icon_data; } diff --git a/src/Global_Version.cpp b/src/Global_Version.cpp index d0ce35c2..db1b0952 100644 --- a/src/Global_Version.cpp +++ b/src/Global_Version.cpp @@ -40,32 +40,23 @@ // GLOBAL VARS /////////////////////////////////////////////////////////////////////////////// +static QReadWriteLock g_lamexp_version_lock; + //Build version -static const struct -{ - unsigned int ver_major; - unsigned int ver_minor; - unsigned int ver_build; - unsigned int ver_confg; - char *ver_release_name; -} -g_lamexp_version = -{ - VER_LAMEXP_MAJOR, - (10 * VER_LAMEXP_MINOR_HI) + VER_LAMEXP_MINOR_LO, - VER_LAMEXP_BUILD, - VER_LAMEXP_CONFG, - VER_LAMEXP_RNAME, -}; +static const unsigned int g_lamexp_version_major = VER_LAMEXP_MAJOR; +static const unsigned int g_lamexp_version_minor = (10 * VER_LAMEXP_MINOR_HI) + VER_LAMEXP_MINOR_LO; +static const unsigned int g_lamexp_version_build = VER_LAMEXP_BUILD; +static const unsigned int g_lamexp_version_confg = VER_LAMEXP_CONFG; +static const char* g_lamexp_version_rname = VER_LAMEXP_RNAME; + +//Demo Version +static int g_lamexp_demo = -1; //Portable Mode -static struct -{ - bool bInitialized; - bool bPortableModeEnabled; - QReadWriteLock lock; -} -g_lamexp_portable; +static int g_lamexp_portable = -1; + +//Expiration date +static QScopedPointer g_lamexp_expiration_date; //Official web-site URL static const char *g_lamexp_website_url = "http://lamexp.sourceforge.net/"; @@ -86,14 +77,14 @@ static const unsigned int g_lamexp_toolver_coreaudio = VER_LAMEXP_TOOL_COREAUDIO /* * Version getters */ -unsigned int lamexp_version_major(void) { return g_lamexp_version.ver_major; } -unsigned int lamexp_version_minor(void) { return g_lamexp_version.ver_minor; } -unsigned int lamexp_version_build(void) { return g_lamexp_version.ver_build; } -unsigned int lamexp_version_confg(void) { return g_lamexp_version.ver_confg; } -const char* lamexp_version_release(void) { return g_lamexp_version.ver_release_name; } -unsigned int lamexp_toolver_neroaac(void) { return g_lamexp_toolver_neroaac; } +unsigned int lamexp_version_major(void) { return g_lamexp_version_major; } +unsigned int lamexp_version_minor(void) { return g_lamexp_version_minor; } +unsigned int lamexp_version_build(void) { return g_lamexp_version_build; } +unsigned int lamexp_version_confg(void) { return g_lamexp_version_confg; } +const char* lamexp_version_release(void) { return g_lamexp_version_rname; } +unsigned int lamexp_toolver_neroaac(void) { return g_lamexp_toolver_neroaac; } unsigned int lamexp_toolver_fhgaacenc(void) { return g_lamexp_toolver_fhgaacenc; } -unsigned int lamexp_toolver_qaacenc(void) { return g_lamexp_toolver_qaacenc; } +unsigned int lamexp_toolver_qaacenc(void) { return g_lamexp_toolver_qaacenc; } unsigned int lamexp_toolver_coreaudio(void) { return g_lamexp_toolver_coreaudio; } /* @@ -109,66 +100,77 @@ const char *lamexp_tracker_url(void) { return g_lamexp_tracker_url; } */ bool lamexp_version_demo(void) { - return _strnicmp(g_lamexp_version.ver_release_name, "Final", 5) && _strnicmp(g_lamexp_version.ver_release_name, "Hotfix", 6); + QReadLocker readLock(&g_lamexp_version_lock); + + if(g_lamexp_demo >= 0) + { + return (g_lamexp_demo > 0); + } + + readLock.unlock(); + QWriteLocker writeLock(&g_lamexp_version_lock); + + if(g_lamexp_demo < 0) + { + g_lamexp_demo = (_strnicmp(g_lamexp_version_rname, "Final", 5) && _strnicmp(g_lamexp_version_rname, "Hotfix", 6)) ? (1) : (0); + } + + return (g_lamexp_demo > 0); } /* * Calculate expiration date */ -QDate lamexp_version_expires(void) +QDate &lamexp_version_expires(void) { - return MUtils::Version::app_build_date().addDays(MUTILS_DEBUG ? 7 : 30); + QReadLocker readLock(&g_lamexp_version_lock); + + if(!g_lamexp_expiration_date.isNull()) + { + return *g_lamexp_expiration_date; + } + + readLock.unlock(); + QWriteLocker writeLock(&g_lamexp_version_lock); + + if(g_lamexp_expiration_date.isNull()) + { + g_lamexp_expiration_date.reset(new QDate(MUtils::Version::app_build_date().addDays(MUTILS_DEBUG ? 7 : 30))); + } + + return *g_lamexp_expiration_date; } /* * Check for LameXP "portable" mode */ -bool lamexp_portable_mode(void) +bool lamexp_version_portable(void) { - QReadLocker readLock(&g_lamexp_portable.lock); + QReadLocker readLock(&g_lamexp_version_lock); - if(g_lamexp_portable.bInitialized) + if(g_lamexp_portable >= 0) { - return g_lamexp_portable.bPortableModeEnabled; + return (g_lamexp_portable > 0); } readLock.unlock(); - QWriteLocker writeLock(&g_lamexp_portable.lock); + QWriteLocker writeLock(&g_lamexp_version_lock); - if(!g_lamexp_portable.bInitialized) + if(g_lamexp_portable < 0) { if(VER_LAMEXP_PORTABLE_EDITION) { qWarning("LameXP portable edition!\n"); - g_lamexp_portable.bPortableModeEnabled = true; + g_lamexp_portable = 1; } else { - QString baseName = QFileInfo(QApplication::applicationFilePath()).completeBaseName(); - int idx1 = baseName.indexOf("lamexp", 0, Qt::CaseInsensitive); - int idx2 = baseName.lastIndexOf("portable", -1, Qt::CaseInsensitive); - g_lamexp_portable.bPortableModeEnabled = ((idx1 >= 0) && (idx2 >= 0) && (idx1 < idx2)); + const QString baseName = QFileInfo(QApplication::applicationFilePath()).completeBaseName(); + const int idx1 = baseName.indexOf("lamexp", 0, Qt::CaseInsensitive); + const int idx2 = baseName.lastIndexOf("portable", -1, Qt::CaseInsensitive); + g_lamexp_portable = ((idx1 >= 0) && (idx2 >= 0) && (idx1 < idx2)) ? (1) : (0); } - g_lamexp_portable.bInitialized = true; } - return g_lamexp_portable.bPortableModeEnabled; -} - -/////////////////////////////////////////////////////////////////////////////// -// INITIALIZATION -/////////////////////////////////////////////////////////////////////////////// - -extern "C" void _lamexp_global_init_versn(void) -{ - MUTILS_ZERO_MEMORY(g_lamexp_portable); -} - -/////////////////////////////////////////////////////////////////////////////// -// FINALIZATION -/////////////////////////////////////////////////////////////////////////////// - -extern "C" void _lamexp_global_free_versn(void) -{ - /*nothing to do here*/ + return (g_lamexp_portable > 0); } diff --git a/src/Global_Zero.cpp b/src/Global_Zero.cpp index f3d09593..809c8bff 100644 --- a/src/Global_Zero.cpp +++ b/src/Global_Zero.cpp @@ -70,14 +70,8 @@ static size_t lamexp_entry_check(void) extern "C" { int mainCRTStartup(void); - - void _lamexp_global_init_versn(void); void _lamexp_global_init_tools(void); - void _lamexp_global_init_utils(void); - - void _lamexp_global_free_versn(void); void _lamexp_global_free_tools(void); - void _lamexp_global_free_utils(void); } /* @@ -92,9 +86,7 @@ extern "C" int lamexp_entry_point(void) } //Call global initialization functions - _lamexp_global_init_versn(); _lamexp_global_init_tools(); - _lamexp_global_init_utils(); //Make sure we will pass the check g_lamexp_entry_check_flag = (~g_lamexp_entry_check_flag); @@ -111,7 +103,5 @@ void lamexp_finalization(void) qDebug("lamexp_finalization()"); //Call global finalization functions, in proper order - _lamexp_global_free_versn(); _lamexp_global_free_tools(); - _lamexp_global_free_utils(); } diff --git a/src/Model_FileList.cpp b/src/Model_FileList.cpp index 78d26aaa..4ad59b37 100644 --- a/src/Model_FileList.cpp +++ b/src/Model_FileList.cpp @@ -355,7 +355,7 @@ int FileListModel::importFromCsv(QWidget *parent, const QString &inFile) QStringList codecList; codecList.append(systemDefault); - codecList.append(lamexp_available_codepages()); + codecList.append(MUtils::available_codepages()); QInputDialog *input = new QInputDialog(parent); input->setLabelText(EXPAND(tr("Select ANSI Codepage for CSV file:"))); diff --git a/src/Model_Settings.cpp b/src/Model_Settings.cpp index db6f135f..4f7dfc16 100644 --- a/src/Model_Settings.cpp +++ b/src/Model_Settings.cpp @@ -287,7 +287,7 @@ SettingsModel::SettingsModel(void) { QString configPath = "LameXP.ini"; - if(!lamexp_portable_mode()) + if(!lamexp_version_portable()) { QString dataPath = initDirectory(QDesktopServices::storageLocation(QDesktopServices::DataLocation)); if(!dataPath.isEmpty()) @@ -567,7 +567,7 @@ LAMEXP_MAKE_OPTION_I(aftenExponentSearchSize, 8) LAMEXP_MAKE_OPTION_B(aftenFastBitAllocation, false) LAMEXP_MAKE_OPTION_B(antivirNotificationsEnabled, true) LAMEXP_MAKE_OPTION_B(autoUpdateCheckBeta, false) -LAMEXP_MAKE_OPTION_B(autoUpdateEnabled, (!lamexp_portable_mode())); +LAMEXP_MAKE_OPTION_B(autoUpdateEnabled, (!lamexp_version_portable())); LAMEXP_MAKE_OPTION_S(autoUpdateLastCheck, "Never") LAMEXP_MAKE_OPTION_B(bitrateManagementEnabled, false) LAMEXP_MAKE_OPTION_I(bitrateManagementMaxRate, 500) @@ -652,7 +652,7 @@ LAMEXP_MAKE_OPTION_B(prependRelativeSourcePath, false) LAMEXP_MAKE_OPTION_B(renameOutputFilesEnabled, false) LAMEXP_MAKE_OPTION_S(renameOutputFilesPattern, "[] - ") LAMEXP_MAKE_OPTION_I(samplingRate, 0) -LAMEXP_MAKE_OPTION_B(shellIntegrationEnabled, !lamexp_portable_mode()) +LAMEXP_MAKE_OPTION_B(shellIntegrationEnabled, !lamexp_version_portable()) LAMEXP_MAKE_OPTION_B(slowStartup, false) LAMEXP_MAKE_OPTION_B(soundsEnabled, true) LAMEXP_MAKE_OPTION_I(toneAdjustBass, 0) diff --git a/src/Registry_Encoder.cpp b/src/Registry_Encoder.cpp index 668aa5ea..f76e250d 100644 --- a/src/Registry_Encoder.cpp +++ b/src/Registry_Encoder.cpp @@ -476,15 +476,15 @@ void EncoderRegistry::resetAllEncoders(SettingsModel *settings) int EncoderRegistry::getAacEncoder(void) { - if(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxr.dll") && lamexp_check_tool("libsoxconvolver.dll")) + if(lamexp_tool_check("qaac.exe") && lamexp_tool_check("libsoxr.dll") && lamexp_tool_check("libsoxconvolver.dll")) { return SettingsModel::AAC_ENCODER_QAAC; } - else if(lamexp_check_tool("fhgaacenc.exe") && lamexp_check_tool("enc_fhgaac.dll") && lamexp_check_tool("nsutil.dll") && lamexp_check_tool("libmp4v2.dll")) + else if(lamexp_tool_check("fhgaacenc.exe") && lamexp_tool_check("enc_fhgaac.dll") && lamexp_tool_check("nsutil.dll") && lamexp_tool_check("libmp4v2.dll")) { return SettingsModel::AAC_ENCODER_FHG; } - else if(lamexp_check_tool("neroAacEnc.exe") && lamexp_check_tool("neroAacDec.exe") && lamexp_check_tool("neroAacTag.exe")) + else if(lamexp_tool_check("neroAacEnc.exe") && lamexp_tool_check("neroAacDec.exe") && lamexp_tool_check("neroAacTag.exe")) { return SettingsModel::AAC_ENCODER_NERO; } diff --git a/src/Thread_CueSplitter.cpp b/src/Thread_CueSplitter.cpp index e40fa6f4..ce064d5d 100644 --- a/src/Thread_CueSplitter.cpp +++ b/src/Thread_CueSplitter.cpp @@ -56,7 +56,7 @@ CueSplitter::CueSplitter(const QString &outputDir, const QString &baseName, CueS m_model(model), m_outputDir(outputDir), m_baseName(baseName), - m_soxBin(lamexp_lookup_tool("sox.exe")) + m_soxBin(lamexp_tool_lookup("sox.exe")) { if(m_soxBin.isEmpty()) { diff --git a/src/Thread_FileAnalyzer_Task.cpp b/src/Thread_FileAnalyzer_Task.cpp index 5c3193d7..64384682 100644 --- a/src/Thread_FileAnalyzer_Task.cpp +++ b/src/Thread_FileAnalyzer_Task.cpp @@ -63,8 +63,8 @@ AnalyzeTask::AnalyzeTask(const int taskId, const QString &inputFile, const QStri m_taskId(taskId), m_inputFile(inputFile), m_templateFile(templateFile), - m_mediaInfoBin(lamexp_lookup_tool("mediainfo.exe")), - m_avs2wavBin(lamexp_lookup_tool("avs2wav.exe")), + m_mediaInfoBin(lamexp_tool_lookup("mediainfo.exe")), + m_avs2wavBin(lamexp_tool_lookup("avs2wav.exe")), m_abortFlag(abortFlag) { if(m_mediaInfoBin.isEmpty() || m_avs2wavBin.isEmpty()) diff --git a/src/Thread_Initialization.cpp b/src/Thread_Initialization.cpp index 16cde2cb..99d63e50 100644 --- a/src/Thread_Initialization.cpp +++ b/src/Thread_Initialization.cpp @@ -183,7 +183,7 @@ protected: if(lockedFile) { - lamexp_register_tool(toolShortName, lockedFile, version, &m_toolTag); + lamexp_tool_register(toolShortName, lockedFile, version, &m_toolTag); } } @@ -647,7 +647,7 @@ void InitializationThread::initNeroAac(void) for(int i = 0; i < 3; i++) { - lamexp_register_tool(neroFileInfo[i].fileName(), neroBin[i], neroVersion); + lamexp_tool_register(neroFileInfo[i].fileName(), neroBin[i], neroVersion); } } @@ -755,7 +755,7 @@ void InitializationThread::initFhgAac(void) for(int i = 0; i < 5; i++) { - lamexp_register_tool(fhgFileInfo[i].fileName(), fhgBin[i], fhgVersion); + lamexp_tool_register(fhgFileInfo[i].fileName(), fhgBin[i], fhgVersion); } } @@ -909,10 +909,10 @@ void InitializationThread::initQAac(void) return; } - lamexp_register_tool(qaacFileInfo[0].fileName(), qaacBin[0], qaacVersion); - lamexp_register_tool(qaacFileInfo[1].fileName(), qaacBin[1], qaacVersion); - lamexp_register_tool(qaacFileInfo[2].fileName(), qaacBin[2], qaacVersion); - lamexp_register_tool(qaacFileInfo[3].fileName(), qaacBin[3], qaacVersion); + lamexp_tool_register(qaacFileInfo[0].fileName(), qaacBin[0], qaacVersion); + lamexp_tool_register(qaacFileInfo[1].fileName(), qaacBin[1], qaacVersion); + lamexp_tool_register(qaacFileInfo[2].fileName(), qaacBin[2], qaacVersion); + lamexp_tool_register(qaacFileInfo[3].fileName(), qaacBin[3], qaacVersion); } void InitializationThread::selfTest(void) diff --git a/src/Tool_WaveProperties.cpp b/src/Tool_WaveProperties.cpp index e753caff..c1229497 100644 --- a/src/Tool_WaveProperties.cpp +++ b/src/Tool_WaveProperties.cpp @@ -35,7 +35,7 @@ WaveProperties::WaveProperties(void) : - m_binary(lamexp_lookup_tool("sox.exe")) + m_binary(lamexp_tool_lookup("sox.exe")) { if(m_binary.isEmpty()) {