1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
22 #include "Model_Settings.h"
27 #include <QDesktopServices>
28 #include <QApplication>
32 #include <QStringList>
35 #include <QReadWriteLock>
36 #include <QReadLocker>
37 #include <QWriteLocker>
39 ////////////////////////////////////////////////////////////
41 ////////////////////////////////////////////////////////////
43 #define LAMEXP_MAKE_OPTION_I(OPT,DEF) \
44 int SettingsModel::OPT(void) const { return m_settings->value(g_settingsId_##OPT, DEF).toInt(); } \
45 void SettingsModel::OPT(int value) { m_settings->setValue(g_settingsId_##OPT, value); } \
46 int SettingsModel::OPT##Default(void) { return DEF; }
48 #define LAMEXP_MAKE_OPTION_S(OPT,DEF) \
49 QString SettingsModel::OPT(void) const { return m_settings->value(g_settingsId_##OPT, DEF).toString().trimmed(); } \
50 void SettingsModel::OPT(const QString &value) { m_settings->setValue(g_settingsId_##OPT, value); } \
51 QString SettingsModel::OPT##Default(void) { return DEF; }
53 #define LAMEXP_MAKE_OPTION_B(OPT,DEF) \
54 bool SettingsModel::OPT(void) const { return m_settings->value(g_settingsId_##OPT, DEF).toBool(); } \
55 void SettingsModel::OPT(bool value) { m_settings->setValue(g_settingsId_##OPT, value); } \
56 bool SettingsModel::OPT##Default(void) { return DEF; }
58 #define LAMEXP_MAKE_OPTION_U(OPT,DEF) \
59 unsigned int SettingsModel::OPT(void) const { return m_settings->value(g_settingsId_##OPT, DEF).toUInt(); } \
60 void SettingsModel::OPT(unsigned int value) { m_settings->setValue(g_settingsId_##OPT, value); } \
61 unsigned int SettingsModel::OPT##Default(void) { return DEF; }
63 #define LAMEXP_MAKE_ID(DEC,STR) static const char *g_settingsId_##DEC = STR
64 #define REMOVE_GROUP(OBJ,ID) OBJ->beginGroup(ID); OBJ->remove(""); OBJ->endGroup();
66 ////////////////////////////////////////////////////////////
68 ////////////////////////////////////////////////////////////
71 LAMEXP_MAKE_ID(aacEncProfile, "AdvancedOptions/AACEnc/ForceProfile");
72 LAMEXP_MAKE_ID(aftenAudioCodingMode, "AdvancedOptions/Aften/AudioCodingMode");
73 LAMEXP_MAKE_ID(aftenDynamicRangeCompression, "AdvancedOptions/Aften/DynamicRangeCompression");
74 LAMEXP_MAKE_ID(aftenExponentSearchSize, "AdvancedOptions/Aften/ExponentSearchSize");
75 LAMEXP_MAKE_ID(aftenFastBitAllocation, "AdvancedOptions/Aften/FastBitAllocation");
76 LAMEXP_MAKE_ID(antivirNotificationsEnabled, "Flags/EnableAntivirusNotifications");
77 LAMEXP_MAKE_ID(autoUpdateCheckBeta, "AutoUpdate/CheckForBetaVersions");
78 LAMEXP_MAKE_ID(autoUpdateEnabled, "AutoUpdate/Enabled");
79 LAMEXP_MAKE_ID(autoUpdateLastCheck, "AutoUpdate/LastCheck");
80 LAMEXP_MAKE_ID(bitrateManagementEnabled, "AdvancedOptions/BitrateManagement/Enabled");
81 LAMEXP_MAKE_ID(bitrateManagementMaxRate, "AdvancedOptions/BitrateManagement/MaxRate");
82 LAMEXP_MAKE_ID(bitrateManagementMinRate, "AdvancedOptions/BitrateManagement/MinRate");
83 LAMEXP_MAKE_ID(compressionBitrateAacEnc, "Compression/Bitrate/AacEnc");
84 LAMEXP_MAKE_ID(compressionBitrateAften, "Compression/Bitrate/Aften");
85 LAMEXP_MAKE_ID(compressionBitrateDcaEnc, "Compression/Bitrate/DcaEnc");
86 LAMEXP_MAKE_ID(compressionBitrateLAME, "Compression/Bitrate/LAME");
87 LAMEXP_MAKE_ID(compressionBitrateOggEnc, "Compression/Bitrate/OggEnc");
88 LAMEXP_MAKE_ID(compressionBitrateOpusEnc, "Compression/Bitrate/OpusEnc");
89 LAMEXP_MAKE_ID(compressionEncoder, "Compression/Encoder");
90 LAMEXP_MAKE_ID(compressionRCModeAacEnc, "Compression/RCMode/AacEnc");
91 LAMEXP_MAKE_ID(compressionRCModeAften, "Compression/RCMode/Aften");
92 LAMEXP_MAKE_ID(compressionRCModeLAME, "Compression/RCMode/LAME");
93 LAMEXP_MAKE_ID(compressionRCModeOggEnc, "Compression/RCMode/OggEnc");
94 LAMEXP_MAKE_ID(compressionRCModeOpusEnc, "Compression/RCMode/OpusEnc");
95 LAMEXP_MAKE_ID(compressionVbrLevelAacEnc, "Compression/VbrLevel/AacEnc");
96 LAMEXP_MAKE_ID(compressionVbrLevelAften, "Compression/VbrLevel/Aften");
97 LAMEXP_MAKE_ID(compressionVbrLevelFLAC, "Compression/VbrLevel/FLAC");
98 LAMEXP_MAKE_ID(compressionVbrLevelLAME, "Compression/VbrLevel/LAME");
99 LAMEXP_MAKE_ID(compressionVbrLevelOggEnc, "Compression/VbrLevel/OggEnc");
100 LAMEXP_MAKE_ID(createPlaylist, "Flags/AutoCreatePlaylist");
101 LAMEXP_MAKE_ID(currentLanguage, "Localization/Language");
102 LAMEXP_MAKE_ID(currentLanguageFile, "Localization/UseQMFile");
103 LAMEXP_MAKE_ID(customParametersAacEnc, "AdvancedOptions/CustomParameters/AacEnc");
104 LAMEXP_MAKE_ID(customParametersAften, "AdvancedOptions/CustomParameters/Aften");
105 LAMEXP_MAKE_ID(customParametersFLAC, "AdvancedOptions/CustomParameters/FLAC");
106 LAMEXP_MAKE_ID(customParametersLAME, "AdvancedOptions/CustomParameters/LAME");
107 LAMEXP_MAKE_ID(customParametersOggEnc, "AdvancedOptions/CustomParameters/OggEnc");
108 LAMEXP_MAKE_ID(customParametersOpus, "AdvancedOptions/CustomParameters/OpusEnc");
109 LAMEXP_MAKE_ID(customTempPath, "AdvancedOptions/TempDirectory/CustomPath");
110 LAMEXP_MAKE_ID(customTempPathEnabled, "AdvancedOptions/TempDirectory/UseCustomPath");
111 LAMEXP_MAKE_ID(dropBoxWidgetEnabled, "Flags/EnableDropBoxWidget");
112 LAMEXP_MAKE_ID(favoriteOutputFolders, "OutputDirectory/Favorites");
113 LAMEXP_MAKE_ID(forceStereoDownmix, "AdvancedOptions/StereoDownmix/Force");
114 LAMEXP_MAKE_ID(hibernateComputer, "AdvancedOptions/HibernateComputerOnShutdown");
115 LAMEXP_MAKE_ID(interfaceStyle, "InterfaceStyle");
116 LAMEXP_MAKE_ID(lameAlgoQuality, "AdvancedOptions/LAME/AlgorithmQuality");
117 LAMEXP_MAKE_ID(lameChannelMode, "AdvancedOptions/LAME/ChannelMode");
118 LAMEXP_MAKE_ID(licenseAccepted, "LicenseAccepted");
119 LAMEXP_MAKE_ID(maximumInstances, "AdvancedOptions/Threading/MaximumInstances");
120 LAMEXP_MAKE_ID(metaInfoPosition, "MetaInformation/PlaylistPosition");
121 LAMEXP_MAKE_ID(mostRecentInputPath, "InputDirectory/MostRecentPath");
122 LAMEXP_MAKE_ID(neroAACEnable2Pass, "AdvancedOptions/AACEnc/Enable2Pass");
123 LAMEXP_MAKE_ID(neroAacNotificationsEnabled, "Flags/EnableNeroAacNotifications");
124 LAMEXP_MAKE_ID(normalizationFilterEnabled, "AdvancedOptions/VolumeNormalization/Enabled");
125 LAMEXP_MAKE_ID(normalizationFilterEqualizationMode, "AdvancedOptions/VolumeNormalization/EqualizationMode");
126 LAMEXP_MAKE_ID(normalizationFilterMaxVolume, "AdvancedOptions/VolumeNormalization/MaxVolume");
127 LAMEXP_MAKE_ID(opusComplexity, "AdvancedOptions/Opus/EncodingComplexity");
128 LAMEXP_MAKE_ID(opusDisableResample, "AdvancedOptions/Opus/DisableResample");
129 LAMEXP_MAKE_ID(opusFramesize, "AdvancedOptions/Opus/FrameSize");
130 LAMEXP_MAKE_ID(opusOptimizeFor, "AdvancedOptions/Opus/OptimizeForSignalType");
131 LAMEXP_MAKE_ID(outputDir, "OutputDirectory/SelectedPath");
132 LAMEXP_MAKE_ID(outputToSourceDir, "OutputDirectory/OutputToSourceFolder");
133 LAMEXP_MAKE_ID(overwriteMode, "AdvancedOptions/OverwriteMode");
134 LAMEXP_MAKE_ID(prependRelativeSourcePath, "OutputDirectory/PrependRelativeSourcePath");
135 LAMEXP_MAKE_ID(renameOutputFilesEnabled, "AdvancedOptions/RenameOutputFiles/Enabled");
136 LAMEXP_MAKE_ID(renameOutputFilesPattern, "AdvancedOptions/RenameOutputFiles/Pattern");
137 LAMEXP_MAKE_ID(samplingRate, "AdvancedOptions/Common/Resampling");
138 LAMEXP_MAKE_ID(shellIntegrationEnabled, "Flags/EnableShellIntegration");
139 LAMEXP_MAKE_ID(slowStartup, "Flags/SlowStartupDetected");
140 LAMEXP_MAKE_ID(soundsEnabled, "Flags/EnableSounds");
141 LAMEXP_MAKE_ID(toneAdjustBass, "AdvancedOptions/ToneAdjustment/Bass");
142 LAMEXP_MAKE_ID(toneAdjustTreble, "AdvancedOptions/ToneAdjustment/Treble");
143 LAMEXP_MAKE_ID(versionNumber, "VersionNumber");
144 LAMEXP_MAKE_ID(writeMetaTags, "Flags/WriteMetaTags");
147 const int SettingsModel::mp3Bitrates[15] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1};
148 const int SettingsModel::ac3Bitrates[20] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640, -1};
149 const int SettingsModel::samplingRates[8] = {0, 16000, 22050, 24000, 32000, 44100, 48000, -1};
151 static QReadWriteLock s_lock;
153 ////////////////////////////////////////////////////////////
155 ////////////////////////////////////////////////////////////
157 SettingsModel::SettingsModel(void)
159 QString configPath = "LameXP.ini";
161 if(!lamexp_portable_mode())
163 QString dataPath = initDirectory(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
164 if(!dataPath.isEmpty())
166 configPath = QString("%1/config.ini").arg(QDir(dataPath).canonicalPath());
170 qWarning("SettingsModel: DataLocation could not be initialized!");
171 dataPath = initDirectory(QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
172 if(!dataPath.isEmpty())
174 configPath = QString("%1/LameXP.ini").arg(QDir(dataPath).canonicalPath());
180 qDebug("LameXP is running in \"portable\" mode -> config in application dir!\n");
181 QString appPath = QFileInfo(QApplication::applicationFilePath()).canonicalFilePath();
182 if(appPath.isEmpty())
184 appPath = QFileInfo(QApplication::applicationFilePath()).absoluteFilePath();
186 if(QFileInfo(appPath).exists() && QFileInfo(appPath).isFile())
188 configPath = QString("%1/%2.ini").arg(QFileInfo(appPath).absolutePath(), QFileInfo(appPath).completeBaseName());
192 m_settings = new QSettings(configPath, QSettings::IniFormat);
193 const QString groupKey = QString().sprintf("LameXP_%u%02u%05u", lamexp_version_major(), lamexp_version_minor(), lamexp_version_confg());
194 QStringList childGroups = m_settings->childGroups();
196 while(!childGroups.isEmpty())
198 QString current = childGroups.takeFirst();
199 QRegExp filter("^LameXP_(\\d+)(\\d\\d)(\\d\\d\\d\\d\\d)$");
200 if(filter.indexIn(current) >= 0)
203 unsigned int temp = filter.cap(3).toUInt(&ok) + 10;
204 if(ok && (temp >= lamexp_version_confg()))
209 qWarning("Deleting obsolete group from config: %s", current.toUtf8().constData());
210 REMOVE_GROUP(m_settings, current);
213 m_settings->beginGroup(groupKey);
214 m_settings->setValue(g_settingsId_versionNumber, QApplication::applicationVersion());
217 const bool isDefined = m_settings->contains(g_settingsId_outputDir);
218 qWarning("Value '%s' is currently: %s\n", g_settingsId_outputDir, (isDefined ? "defined" : "un-defined"));
221 qWarning("It's value is:\n%s\n", m_settings->value(g_settingsId_outputDir).toString().toUtf8().constData());
223 qWarning("Current output directory is:\n%s\n", outputDir().toUtf8().constData());
226 ////////////////////////////////////////////////////////////
228 ////////////////////////////////////////////////////////////
230 SettingsModel::~SettingsModel(void)
232 LAMEXP_DELETE(m_settings);
233 LAMEXP_DELETE(m_defaultLanguage);
236 ////////////////////////////////////////////////////////////
238 ////////////////////////////////////////////////////////////
240 #define CHECK_RCMODE(NAME) do\
242 if(this->compressionRCMode##NAME() < SettingsModel::VBRMode || this->compressionRCMode##NAME() >= SettingsModel::RCMODE_COUNT) \
244 this->compressionRCMode##NAME(SettingsModel::VBRMode); \
249 void SettingsModel::validate(void)
251 if(this->compressionEncoder() < SettingsModel::MP3Encoder || this->compressionEncoder() >= SettingsModel::ENCODER_COUNT)
253 this->compressionEncoder(SettingsModel::MP3Encoder);
257 CHECK_RCMODE(OggEnc);
258 CHECK_RCMODE(AacEnc);
260 CHECK_RCMODE(OpusEnc);
262 if(!(lamexp_check_tool("neroAacEnc.exe") && lamexp_check_tool("neroAacDec.exe") && lamexp_check_tool("neroAacTag.exe")))
264 if(!(lamexp_check_tool("fhgaacenc.exe") && lamexp_check_tool("enc_fhgaac.dll")))
266 if(!(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxrate.dll")))
268 if(this->compressionEncoder() == SettingsModel::AACEncoder)
270 qWarning("AAC encoder selected, but not available any more. Reverting to MP3!");
271 this->compressionEncoder(SettingsModel::MP3Encoder);
277 if(this->outputDir().isEmpty() || !QFileInfo(this->outputDir()).isDir())
279 qWarning("Output directory not set yet or does NOT exist anymore -> Resetting to QDesktopServices::MusicLocation");
280 QString musicLocation = QDesktopServices::storageLocation(QDesktopServices::MusicLocation);
281 this->outputDir(musicLocation.isEmpty() ? QDesktopServices::storageLocation(QDesktopServices::HomeLocation) : musicLocation);
284 if(this->mostRecentInputPath().isEmpty() || !QFileInfo(this->mostRecentInputPath()).isDir())
286 QString musicLocation = QDesktopServices::storageLocation(QDesktopServices::MusicLocation);
287 this->outputDir(musicLocation.isEmpty() ? QDesktopServices::storageLocation(QDesktopServices::HomeLocation) : musicLocation);
290 if(!this->currentLanguageFile().isEmpty())
292 const QString qmPath = QFileInfo(this->currentLanguageFile()).canonicalFilePath();
293 if(qmPath.isEmpty() || (!(QFileInfo(qmPath).exists() && QFileInfo(qmPath).isFile() && (QFileInfo(qmPath).suffix().compare("qm", Qt::CaseInsensitive) == 0))))
295 qWarning("Current language file missing, reverting to built-in translator!");
296 this->currentLanguageFile(QString());
300 if(!lamexp_query_translations().contains(this->currentLanguage(), Qt::CaseInsensitive))
302 qWarning("Current language \"%s\" is unknown, reverting to default language!", this->currentLanguage().toLatin1().constData());
303 this->currentLanguage(defaultLanguage());
306 if(this->hibernateComputer())
308 if(!lamexp_is_hibernation_supported())
310 this->hibernateComputer(false);
314 if(this->overwriteMode() < SettingsModel::Overwrite_KeepBoth || this->overwriteMode() > SettingsModel::Overwrite_Replaces)
316 this->overwriteMode(SettingsModel::Overwrite_KeepBoth);
321 void SettingsModel::syncNow(void)
326 ////////////////////////////////////////////////////////////
328 ////////////////////////////////////////////////////////////
330 QString *SettingsModel::m_defaultLanguage = NULL;
332 QString SettingsModel::defaultLanguage(void) const
334 QReadLocker readLock(&s_lock);
336 if(m_defaultLanguage)
338 return *m_defaultLanguage;
341 //Acquire write lock now
343 QWriteLocker writeLock(&s_lock);
345 //Detect system langauge
346 QLocale systemLanguage= QLocale::system();
348 qDebug("Language: %s (%d)", QLocale::languageToString(systemLanguage.language()).toUtf8().constData(), systemLanguage.language());
349 qDebug("Country is: %s (%d)", QLocale::countryToString(systemLanguage.country()).toUtf8().constData(), systemLanguage.country());
350 qDebug("Script is: %s (%d)\n", QLocale::scriptToString(systemLanguage.script()).toUtf8().constData(), systemLanguage.script());
352 //Check if we can use the default translation
353 if(systemLanguage.language() == QLocale::English /*|| systemLanguage.language() == QLocale::C*/)
355 m_defaultLanguage = new QString(LAMEXP_DEFAULT_LANGID);
356 return LAMEXP_DEFAULT_LANGID;
359 //Try to find a suitable translation for the user's system language *and* country
360 QStringList languages = lamexp_query_translations();
361 while(!languages.isEmpty())
363 QString currentLangId = languages.takeFirst();
364 if(lamexp_translation_sysid(currentLangId) == systemLanguage.language())
366 if(lamexp_translation_country(currentLangId) == systemLanguage.country())
368 m_defaultLanguage = new QString(currentLangId);
369 return currentLangId;
374 //Try to find a suitable translation for the user's system language
375 languages = lamexp_query_translations();
376 while(!languages.isEmpty())
378 QString currentLangId = languages.takeFirst();
379 if(lamexp_translation_sysid(currentLangId) == systemLanguage.language())
381 m_defaultLanguage = new QString(currentLangId);
382 return currentLangId;
386 //Fall back to the default translation
387 m_defaultLanguage = new QString(LAMEXP_DEFAULT_LANGID);
388 return LAMEXP_DEFAULT_LANGID;
391 QString SettingsModel::initDirectory(const QString &path)
398 if(!QDir(path).exists())
400 for(int i = 0; i < 32; i++)
402 if(QDir(path).mkpath(".")) break;
407 if(!QDir(path).exists())
412 return QDir(path).canonicalPath();
415 ////////////////////////////////////////////////////////////
417 ////////////////////////////////////////////////////////////
419 LAMEXP_MAKE_OPTION_I(aacEncProfile, 0)
420 LAMEXP_MAKE_OPTION_I(aftenAudioCodingMode, 0)
421 LAMEXP_MAKE_OPTION_I(aftenDynamicRangeCompression, 5)
422 LAMEXP_MAKE_OPTION_I(aftenExponentSearchSize, 8)
423 LAMEXP_MAKE_OPTION_B(aftenFastBitAllocation, false)
424 LAMEXP_MAKE_OPTION_B(antivirNotificationsEnabled, true)
425 LAMEXP_MAKE_OPTION_B(autoUpdateCheckBeta, false)
426 LAMEXP_MAKE_OPTION_B(autoUpdateEnabled, true)
427 LAMEXP_MAKE_OPTION_S(autoUpdateLastCheck, "Never")
428 LAMEXP_MAKE_OPTION_B(bitrateManagementEnabled, false)
429 LAMEXP_MAKE_OPTION_I(bitrateManagementMaxRate, 500)
430 LAMEXP_MAKE_OPTION_I(bitrateManagementMinRate, 32)
431 LAMEXP_MAKE_OPTION_I(compressionBitrateAacEnc, 20)
432 LAMEXP_MAKE_OPTION_I(compressionBitrateAften, 15)
433 LAMEXP_MAKE_OPTION_I(compressionBitrateDcaEnc, 47)
434 LAMEXP_MAKE_OPTION_I(compressionBitrateLAME, 10)
435 LAMEXP_MAKE_OPTION_I(compressionBitrateOggEnc, 20)
436 LAMEXP_MAKE_OPTION_I(compressionBitrateOpusEnc, 16)
437 LAMEXP_MAKE_OPTION_I(compressionEncoder, 0)
438 LAMEXP_MAKE_OPTION_I(compressionRCModeAacEnc, 0)
439 LAMEXP_MAKE_OPTION_I(compressionRCModeAften, 0)
440 LAMEXP_MAKE_OPTION_I(compressionRCModeLAME, 0)
441 LAMEXP_MAKE_OPTION_I(compressionRCModeOggEnc, 0)
442 LAMEXP_MAKE_OPTION_I(compressionRCModeOpusEnc, 0)
443 LAMEXP_MAKE_OPTION_I(compressionVbrLevelAacEnc, 10)
444 LAMEXP_MAKE_OPTION_I(compressionVbrLevelAften, 8)
445 LAMEXP_MAKE_OPTION_I(compressionVbrLevelFLAC, 8)
446 LAMEXP_MAKE_OPTION_I(compressionVbrLevelLAME, 7)
447 LAMEXP_MAKE_OPTION_I(compressionVbrLevelOggEnc, 5)
448 LAMEXP_MAKE_OPTION_B(createPlaylist, true)
449 LAMEXP_MAKE_OPTION_S(currentLanguage, defaultLanguage())
450 LAMEXP_MAKE_OPTION_S(currentLanguageFile, QString())
451 LAMEXP_MAKE_OPTION_S(customParametersAacEnc, QString())
452 LAMEXP_MAKE_OPTION_S(customParametersAften, QString())
453 LAMEXP_MAKE_OPTION_S(customParametersFLAC, QString())
454 LAMEXP_MAKE_OPTION_S(customParametersLAME, QString())
455 LAMEXP_MAKE_OPTION_S(customParametersOggEnc, QString())
456 LAMEXP_MAKE_OPTION_S(customParametersOpus, QString())
457 LAMEXP_MAKE_OPTION_S(customTempPath, QDesktopServices::storageLocation(QDesktopServices::TempLocation))
458 LAMEXP_MAKE_OPTION_B(customTempPathEnabled, false)
459 LAMEXP_MAKE_OPTION_B(dropBoxWidgetEnabled, true)
460 LAMEXP_MAKE_OPTION_S(favoriteOutputFolders, QString())
461 LAMEXP_MAKE_OPTION_B(forceStereoDownmix, false)
462 LAMEXP_MAKE_OPTION_B(hibernateComputer, false)
463 LAMEXP_MAKE_OPTION_I(interfaceStyle, 0)
464 LAMEXP_MAKE_OPTION_I(lameAlgoQuality, 2)
465 LAMEXP_MAKE_OPTION_I(lameChannelMode, 0)
466 LAMEXP_MAKE_OPTION_I(licenseAccepted, 0)
467 LAMEXP_MAKE_OPTION_U(maximumInstances, 0)
468 LAMEXP_MAKE_OPTION_U(metaInfoPosition, UINT_MAX)
469 LAMEXP_MAKE_OPTION_S(mostRecentInputPath, QDesktopServices::storageLocation(QDesktopServices::MusicLocation))
470 LAMEXP_MAKE_OPTION_B(neroAACEnable2Pass, true)
471 LAMEXP_MAKE_OPTION_B(neroAacNotificationsEnabled, true)
472 LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled, false)
473 LAMEXP_MAKE_OPTION_I(normalizationFilterEqualizationMode, 0)
474 LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume, -50)
475 LAMEXP_MAKE_OPTION_I(opusComplexity, 10)
476 LAMEXP_MAKE_OPTION_B(opusDisableResample, false)
477 LAMEXP_MAKE_OPTION_I(opusFramesize, 3)
478 LAMEXP_MAKE_OPTION_I(opusOptimizeFor, 0)
479 LAMEXP_MAKE_OPTION_S(outputDir, QDesktopServices::storageLocation(QDesktopServices::MusicLocation))
480 LAMEXP_MAKE_OPTION_B(outputToSourceDir, false)
481 LAMEXP_MAKE_OPTION_I(overwriteMode, Overwrite_KeepBoth)
482 LAMEXP_MAKE_OPTION_B(prependRelativeSourcePath, false)
483 LAMEXP_MAKE_OPTION_B(renameOutputFilesEnabled, false)
484 LAMEXP_MAKE_OPTION_S(renameOutputFilesPattern, "[<TrackNo>] <Artist> - <Title>")
485 LAMEXP_MAKE_OPTION_I(samplingRate, 0)
486 LAMEXP_MAKE_OPTION_B(shellIntegrationEnabled, !lamexp_portable_mode())
487 LAMEXP_MAKE_OPTION_B(slowStartup, false)
488 LAMEXP_MAKE_OPTION_B(soundsEnabled, true)
489 LAMEXP_MAKE_OPTION_I(toneAdjustBass, 0)
490 LAMEXP_MAKE_OPTION_I(toneAdjustTreble, 0)
491 LAMEXP_MAKE_OPTION_B(writeMetaTags, true)