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 #define DIR_EXISTS(PATH) (QFileInfo(PATH).exists() && QFileInfo(PATH).isDir())
68 ////////////////////////////////////////////////////////////
70 ////////////////////////////////////////////////////////////
73 LAMEXP_MAKE_ID(aacEncProfile, "AdvancedOptions/AACEnc/ForceProfile");
74 LAMEXP_MAKE_ID(aftenAudioCodingMode, "AdvancedOptions/Aften/AudioCodingMode");
75 LAMEXP_MAKE_ID(aftenDynamicRangeCompression, "AdvancedOptions/Aften/DynamicRangeCompression");
76 LAMEXP_MAKE_ID(aftenExponentSearchSize, "AdvancedOptions/Aften/ExponentSearchSize");
77 LAMEXP_MAKE_ID(aftenFastBitAllocation, "AdvancedOptions/Aften/FastBitAllocation");
78 LAMEXP_MAKE_ID(antivirNotificationsEnabled, "Flags/EnableAntivirusNotifications");
79 LAMEXP_MAKE_ID(autoUpdateCheckBeta, "AutoUpdate/CheckForBetaVersions");
80 LAMEXP_MAKE_ID(autoUpdateEnabled, "AutoUpdate/Enabled");
81 LAMEXP_MAKE_ID(autoUpdateLastCheck, "AutoUpdate/LastCheck");
82 LAMEXP_MAKE_ID(bitrateManagementEnabled, "AdvancedOptions/BitrateManagement/Enabled");
83 LAMEXP_MAKE_ID(bitrateManagementMaxRate, "AdvancedOptions/BitrateManagement/MaxRate");
84 LAMEXP_MAKE_ID(bitrateManagementMinRate, "AdvancedOptions/BitrateManagement/MinRate");
85 LAMEXP_MAKE_ID(compressionBitrateAacEnc, "Compression/Bitrate/AacEnc");
86 LAMEXP_MAKE_ID(compressionBitrateAften, "Compression/Bitrate/Aften");
87 LAMEXP_MAKE_ID(compressionBitrateDcaEnc, "Compression/Bitrate/DcaEnc");
88 LAMEXP_MAKE_ID(compressionBitrateLAME, "Compression/Bitrate/LAME");
89 LAMEXP_MAKE_ID(compressionBitrateOggEnc, "Compression/Bitrate/OggEnc");
90 LAMEXP_MAKE_ID(compressionBitrateOpusEnc, "Compression/Bitrate/OpusEnc");
91 LAMEXP_MAKE_ID(compressionEncoder, "Compression/Encoder");
92 LAMEXP_MAKE_ID(compressionRCModeAacEnc, "Compression/RCMode/AacEnc");
93 LAMEXP_MAKE_ID(compressionRCModeAften, "Compression/RCMode/Aften");
94 LAMEXP_MAKE_ID(compressionRCModeLAME, "Compression/RCMode/LAME");
95 LAMEXP_MAKE_ID(compressionRCModeOggEnc, "Compression/RCMode/OggEnc");
96 LAMEXP_MAKE_ID(compressionRCModeOpusEnc, "Compression/RCMode/OpusEnc");
97 LAMEXP_MAKE_ID(compressionVbrLevelAacEnc, "Compression/VbrLevel/AacEnc");
98 LAMEXP_MAKE_ID(compressionVbrLevelAften, "Compression/VbrLevel/Aften");
99 LAMEXP_MAKE_ID(compressionVbrLevelFLAC, "Compression/VbrLevel/FLAC");
100 LAMEXP_MAKE_ID(compressionVbrLevelLAME, "Compression/VbrLevel/LAME");
101 LAMEXP_MAKE_ID(compressionVbrLevelOggEnc, "Compression/VbrLevel/OggEnc");
102 LAMEXP_MAKE_ID(createPlaylist, "Flags/AutoCreatePlaylist");
103 LAMEXP_MAKE_ID(currentLanguage, "Localization/Language");
104 LAMEXP_MAKE_ID(currentLanguageFile, "Localization/UseQMFile");
105 LAMEXP_MAKE_ID(customParametersAacEnc, "AdvancedOptions/CustomParameters/AacEnc");
106 LAMEXP_MAKE_ID(customParametersAften, "AdvancedOptions/CustomParameters/Aften");
107 LAMEXP_MAKE_ID(customParametersFLAC, "AdvancedOptions/CustomParameters/FLAC");
108 LAMEXP_MAKE_ID(customParametersLAME, "AdvancedOptions/CustomParameters/LAME");
109 LAMEXP_MAKE_ID(customParametersOggEnc, "AdvancedOptions/CustomParameters/OggEnc");
110 LAMEXP_MAKE_ID(customParametersOpus, "AdvancedOptions/CustomParameters/OpusEnc");
111 LAMEXP_MAKE_ID(customTempPath, "AdvancedOptions/TempDirectory/CustomPath");
112 LAMEXP_MAKE_ID(customTempPathEnabled, "AdvancedOptions/TempDirectory/UseCustomPath");
113 LAMEXP_MAKE_ID(dropBoxWidgetEnabled, "Flags/EnableDropBoxWidget");
114 LAMEXP_MAKE_ID(favoriteOutputFolders, "OutputDirectory/Favorites");
115 LAMEXP_MAKE_ID(forceStereoDownmix, "AdvancedOptions/StereoDownmix/Force");
116 LAMEXP_MAKE_ID(hibernateComputer, "AdvancedOptions/HibernateComputerOnShutdown");
117 LAMEXP_MAKE_ID(interfaceStyle, "InterfaceStyle");
118 LAMEXP_MAKE_ID(lameAlgoQuality, "AdvancedOptions/LAME/AlgorithmQuality");
119 LAMEXP_MAKE_ID(lameChannelMode, "AdvancedOptions/LAME/ChannelMode");
120 LAMEXP_MAKE_ID(licenseAccepted, "LicenseAccepted");
121 LAMEXP_MAKE_ID(maximumInstances, "AdvancedOptions/Threading/MaximumInstances");
122 LAMEXP_MAKE_ID(metaInfoPosition, "MetaInformation/PlaylistPosition");
123 LAMEXP_MAKE_ID(mostRecentInputPath, "InputDirectory/MostRecentPath");
124 LAMEXP_MAKE_ID(neroAACEnable2Pass, "AdvancedOptions/AACEnc/Enable2Pass");
125 LAMEXP_MAKE_ID(neroAacNotificationsEnabled, "Flags/EnableNeroAacNotifications");
126 LAMEXP_MAKE_ID(normalizationFilterEnabled, "AdvancedOptions/VolumeNormalization/Enabled");
127 LAMEXP_MAKE_ID(normalizationFilterEqualizationMode, "AdvancedOptions/VolumeNormalization/EqualizationMode");
128 LAMEXP_MAKE_ID(normalizationFilterMaxVolume, "AdvancedOptions/VolumeNormalization/MaxVolume");
129 LAMEXP_MAKE_ID(opusComplexity, "AdvancedOptions/Opus/EncodingComplexity");
130 LAMEXP_MAKE_ID(opusDisableResample, "AdvancedOptions/Opus/DisableResample");
131 LAMEXP_MAKE_ID(opusFramesize, "AdvancedOptions/Opus/FrameSize");
132 LAMEXP_MAKE_ID(opusOptimizeFor, "AdvancedOptions/Opus/OptimizeForSignalType");
133 LAMEXP_MAKE_ID(outputDir, "OutputDirectory/SelectedPath");
134 LAMEXP_MAKE_ID(outputToSourceDir, "OutputDirectory/OutputToSourceFolder");
135 LAMEXP_MAKE_ID(overwriteMode, "AdvancedOptions/OverwriteMode");
136 LAMEXP_MAKE_ID(prependRelativeSourcePath, "OutputDirectory/PrependRelativeSourcePath");
137 LAMEXP_MAKE_ID(renameOutputFilesEnabled, "AdvancedOptions/RenameOutputFiles/Enabled");
138 LAMEXP_MAKE_ID(renameOutputFilesPattern, "AdvancedOptions/RenameOutputFiles/Pattern");
139 LAMEXP_MAKE_ID(samplingRate, "AdvancedOptions/Common/Resampling");
140 LAMEXP_MAKE_ID(shellIntegrationEnabled, "Flags/EnableShellIntegration");
141 LAMEXP_MAKE_ID(slowStartup, "Flags/SlowStartupDetected");
142 LAMEXP_MAKE_ID(soundsEnabled, "Flags/EnableSounds");
143 LAMEXP_MAKE_ID(toneAdjustBass, "AdvancedOptions/ToneAdjustment/Bass");
144 LAMEXP_MAKE_ID(toneAdjustTreble, "AdvancedOptions/ToneAdjustment/Treble");
145 LAMEXP_MAKE_ID(versionNumber, "VersionNumber");
146 LAMEXP_MAKE_ID(writeMetaTags, "Flags/WriteMetaTags");
149 const int SettingsModel::mp3Bitrates[15] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1};
150 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};
151 const int SettingsModel::samplingRates[8] = {0, 16000, 22050, 24000, 32000, 44100, 48000, -1};
153 static QReadWriteLock s_lock;
155 ////////////////////////////////////////////////////////////
157 ////////////////////////////////////////////////////////////
159 SettingsModel::SettingsModel(void)
161 QString configPath = "LameXP.ini";
163 if(!lamexp_portable_mode())
165 QString dataPath = initDirectory(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
166 if(!dataPath.isEmpty())
168 configPath = QString("%1/config.ini").arg(QDir(dataPath).canonicalPath());
172 qWarning("SettingsModel: DataLocation could not be initialized!");
173 dataPath = initDirectory(QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
174 if(!dataPath.isEmpty())
176 configPath = QString("%1/LameXP.ini").arg(QDir(dataPath).canonicalPath());
182 qDebug("LameXP is running in \"portable\" mode -> config in application dir!\n");
183 QString appPath = QFileInfo(QApplication::applicationFilePath()).canonicalFilePath();
184 if(appPath.isEmpty())
186 appPath = QFileInfo(QApplication::applicationFilePath()).absoluteFilePath();
188 if(QFileInfo(appPath).exists() && QFileInfo(appPath).isFile())
190 configPath = QString("%1/%2.ini").arg(QFileInfo(appPath).absolutePath(), QFileInfo(appPath).completeBaseName());
194 m_settings = new QSettings(configPath, QSettings::IniFormat);
195 const QString groupKey = QString().sprintf("LameXP_%u%02u%05u", lamexp_version_major(), lamexp_version_minor(), lamexp_version_confg());
196 QStringList childGroups = m_settings->childGroups();
198 while(!childGroups.isEmpty())
200 QString current = childGroups.takeFirst();
201 QRegExp filter("^LameXP_(\\d+)(\\d\\d)(\\d\\d\\d\\d\\d)$");
202 if(filter.indexIn(current) >= 0)
205 unsigned int temp = filter.cap(3).toUInt(&ok) + 10;
206 if(ok && (temp >= lamexp_version_confg()))
211 qWarning("Deleting obsolete group from config: %s", current.toUtf8().constData());
212 REMOVE_GROUP(m_settings, current);
215 m_settings->beginGroup(groupKey);
216 m_settings->setValue(g_settingsId_versionNumber, QApplication::applicationVersion());
219 const bool isDefined = m_settings->contains(g_settingsId_outputDir);
220 qWarning("Value '%s' is currently: %s\n", g_settingsId_outputDir, (isDefined ? "defined" : "un-defined"));
223 qWarning("It's value is:\n%s\n", m_settings->value(g_settingsId_outputDir).toString().toUtf8().constData());
225 qWarning("Current output directory is:\n%s\n", outputDir().toUtf8().constData());
228 ////////////////////////////////////////////////////////////
230 ////////////////////////////////////////////////////////////
232 SettingsModel::~SettingsModel(void)
234 LAMEXP_DELETE(m_settings);
235 LAMEXP_DELETE(m_defaultLanguage);
238 ////////////////////////////////////////////////////////////
240 ////////////////////////////////////////////////////////////
242 #define CHECK_RCMODE(NAME) do\
244 if(this->compressionRCMode##NAME() < SettingsModel::VBRMode || this->compressionRCMode##NAME() >= SettingsModel::RCMODE_COUNT) \
246 this->compressionRCMode##NAME(SettingsModel::VBRMode); \
251 void SettingsModel::validate(void)
253 if(this->compressionEncoder() < SettingsModel::MP3Encoder || this->compressionEncoder() >= SettingsModel::ENCODER_COUNT)
255 this->compressionEncoder(SettingsModel::MP3Encoder);
259 CHECK_RCMODE(OggEnc);
260 CHECK_RCMODE(AacEnc);
262 CHECK_RCMODE(OpusEnc);
264 if(!(lamexp_check_tool("neroAacEnc.exe") && lamexp_check_tool("neroAacDec.exe") && lamexp_check_tool("neroAacTag.exe")))
266 if(!(lamexp_check_tool("fhgaacenc.exe") && lamexp_check_tool("enc_fhgaac.dll")))
268 if(!(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxrate.dll")))
270 if(this->compressionEncoder() == SettingsModel::AACEncoder)
272 qWarning("AAC encoder selected, but not available any more. Reverting to MP3!");
273 this->compressionEncoder(SettingsModel::MP3Encoder);
279 if(this->outputDir().isEmpty() || (!DIR_EXISTS(this->outputDir())))
281 qWarning("Output directory not set yet or does NOT exist anymore -> Resetting");
282 this->outputDir(defaultDirectory());
285 if(this->mostRecentInputPath().isEmpty() || (!DIR_EXISTS(this->mostRecentInputPath())))
287 qWarning("Most recent input directory not set yet or does NOT exist anymore -> Resetting");
288 this->mostRecentInputPath(defaultDirectory());
291 if(!this->currentLanguageFile().isEmpty())
293 const QString qmPath = QFileInfo(this->currentLanguageFile()).canonicalFilePath();
294 if(qmPath.isEmpty() || (!(QFileInfo(qmPath).exists() && QFileInfo(qmPath).isFile() && (QFileInfo(qmPath).suffix().compare("qm", Qt::CaseInsensitive) == 0))))
296 qWarning("Current language file missing, reverting to built-in translator!");
297 this->currentLanguageFile(QString());
301 if(!lamexp_query_translations().contains(this->currentLanguage(), Qt::CaseInsensitive))
303 qWarning("Current language \"%s\" is unknown, reverting to default language!", this->currentLanguage().toLatin1().constData());
304 this->currentLanguage(defaultLanguage());
307 if(this->hibernateComputer())
309 if(!lamexp_is_hibernation_supported())
311 this->hibernateComputer(false);
315 if(this->overwriteMode() < SettingsModel::Overwrite_KeepBoth || this->overwriteMode() > SettingsModel::Overwrite_Replaces)
317 this->overwriteMode(SettingsModel::Overwrite_KeepBoth);
322 void SettingsModel::syncNow(void)
327 ////////////////////////////////////////////////////////////
329 ////////////////////////////////////////////////////////////
331 QString *SettingsModel::m_defaultLanguage = NULL;
333 QString SettingsModel::defaultLanguage(void) const
335 QReadLocker readLock(&s_lock);
337 if(m_defaultLanguage)
339 return *m_defaultLanguage;
342 //Acquire write lock now
344 QWriteLocker writeLock(&s_lock);
346 //Detect system langauge
347 QLocale systemLanguage= QLocale::system();
349 qDebug("Language: %s (%d)", QLocale::languageToString(systemLanguage.language()).toUtf8().constData(), systemLanguage.language());
350 qDebug("Country is: %s (%d)", QLocale::countryToString(systemLanguage.country()).toUtf8().constData(), systemLanguage.country());
351 qDebug("Script is: %s (%d)\n", QLocale::scriptToString(systemLanguage.script()).toUtf8().constData(), systemLanguage.script());
353 //Check if we can use the default translation
354 if(systemLanguage.language() == QLocale::English /*|| systemLanguage.language() == QLocale::C*/)
356 m_defaultLanguage = new QString(LAMEXP_DEFAULT_LANGID);
357 return LAMEXP_DEFAULT_LANGID;
360 //Try to find a suitable translation for the user's system language *and* country
361 QStringList languages = lamexp_query_translations();
362 while(!languages.isEmpty())
364 QString currentLangId = languages.takeFirst();
365 if(lamexp_translation_sysid(currentLangId) == systemLanguage.language())
367 if(lamexp_translation_country(currentLangId) == systemLanguage.country())
369 m_defaultLanguage = new QString(currentLangId);
370 return currentLangId;
375 //Try to find a suitable translation for the user's system language
376 languages = lamexp_query_translations();
377 while(!languages.isEmpty())
379 QString currentLangId = languages.takeFirst();
380 if(lamexp_translation_sysid(currentLangId) == systemLanguage.language())
382 m_defaultLanguage = new QString(currentLangId);
383 return currentLangId;
387 //Fall back to the default translation
388 m_defaultLanguage = new QString(LAMEXP_DEFAULT_LANGID);
389 return LAMEXP_DEFAULT_LANGID;
392 QString SettingsModel::defaultDirectory(void) const
394 QString defaultLocation = initDirectory(QDesktopServices::storageLocation(QDesktopServices::MusicLocation));
396 if(defaultLocation.isEmpty())
398 defaultLocation = initDirectory(QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
400 if(defaultLocation.isEmpty())
402 defaultLocation = initDirectory(QDir::currentPath());
406 return defaultLocation;
409 QString SettingsModel::initDirectory(const QString &path) const
416 if(!QDir(path).exists())
418 for(int i = 0; i < 32; i++)
420 if(QDir(path).mkpath(".")) break;
425 if(!QDir(path).exists())
430 return QDir(path).canonicalPath();
433 ////////////////////////////////////////////////////////////
435 ////////////////////////////////////////////////////////////
437 LAMEXP_MAKE_OPTION_I(aacEncProfile, 0)
438 LAMEXP_MAKE_OPTION_I(aftenAudioCodingMode, 0)
439 LAMEXP_MAKE_OPTION_I(aftenDynamicRangeCompression, 5)
440 LAMEXP_MAKE_OPTION_I(aftenExponentSearchSize, 8)
441 LAMEXP_MAKE_OPTION_B(aftenFastBitAllocation, false)
442 LAMEXP_MAKE_OPTION_B(antivirNotificationsEnabled, true)
443 LAMEXP_MAKE_OPTION_B(autoUpdateCheckBeta, false)
444 LAMEXP_MAKE_OPTION_B(autoUpdateEnabled, true)
445 LAMEXP_MAKE_OPTION_S(autoUpdateLastCheck, "Never")
446 LAMEXP_MAKE_OPTION_B(bitrateManagementEnabled, false)
447 LAMEXP_MAKE_OPTION_I(bitrateManagementMaxRate, 500)
448 LAMEXP_MAKE_OPTION_I(bitrateManagementMinRate, 32)
449 LAMEXP_MAKE_OPTION_I(compressionBitrateAacEnc, 20)
450 LAMEXP_MAKE_OPTION_I(compressionBitrateAften, 15)
451 LAMEXP_MAKE_OPTION_I(compressionBitrateDcaEnc, 47)
452 LAMEXP_MAKE_OPTION_I(compressionBitrateLAME, 10)
453 LAMEXP_MAKE_OPTION_I(compressionBitrateOggEnc, 20)
454 LAMEXP_MAKE_OPTION_I(compressionBitrateOpusEnc, 16)
455 LAMEXP_MAKE_OPTION_I(compressionEncoder, 0)
456 LAMEXP_MAKE_OPTION_I(compressionRCModeAacEnc, 0)
457 LAMEXP_MAKE_OPTION_I(compressionRCModeAften, 0)
458 LAMEXP_MAKE_OPTION_I(compressionRCModeLAME, 0)
459 LAMEXP_MAKE_OPTION_I(compressionRCModeOggEnc, 0)
460 LAMEXP_MAKE_OPTION_I(compressionRCModeOpusEnc, 0)
461 LAMEXP_MAKE_OPTION_I(compressionVbrLevelAacEnc, 10)
462 LAMEXP_MAKE_OPTION_I(compressionVbrLevelAften, 8)
463 LAMEXP_MAKE_OPTION_I(compressionVbrLevelFLAC, 8)
464 LAMEXP_MAKE_OPTION_I(compressionVbrLevelLAME, 7)
465 LAMEXP_MAKE_OPTION_I(compressionVbrLevelOggEnc, 5)
466 LAMEXP_MAKE_OPTION_B(createPlaylist, true)
467 LAMEXP_MAKE_OPTION_S(currentLanguage, defaultLanguage())
468 LAMEXP_MAKE_OPTION_S(currentLanguageFile, QString())
469 LAMEXP_MAKE_OPTION_S(customParametersAacEnc, QString())
470 LAMEXP_MAKE_OPTION_S(customParametersAften, QString())
471 LAMEXP_MAKE_OPTION_S(customParametersFLAC, QString())
472 LAMEXP_MAKE_OPTION_S(customParametersLAME, QString())
473 LAMEXP_MAKE_OPTION_S(customParametersOggEnc, QString())
474 LAMEXP_MAKE_OPTION_S(customParametersOpus, QString())
475 LAMEXP_MAKE_OPTION_S(customTempPath, QDesktopServices::storageLocation(QDesktopServices::TempLocation))
476 LAMEXP_MAKE_OPTION_B(customTempPathEnabled, false)
477 LAMEXP_MAKE_OPTION_B(dropBoxWidgetEnabled, true)
478 LAMEXP_MAKE_OPTION_S(favoriteOutputFolders, QString())
479 LAMEXP_MAKE_OPTION_B(forceStereoDownmix, false)
480 LAMEXP_MAKE_OPTION_B(hibernateComputer, false)
481 LAMEXP_MAKE_OPTION_I(interfaceStyle, 0)
482 LAMEXP_MAKE_OPTION_I(lameAlgoQuality, 2)
483 LAMEXP_MAKE_OPTION_I(lameChannelMode, 0)
484 LAMEXP_MAKE_OPTION_I(licenseAccepted, 0)
485 LAMEXP_MAKE_OPTION_U(maximumInstances, 0)
486 LAMEXP_MAKE_OPTION_U(metaInfoPosition, UINT_MAX)
487 LAMEXP_MAKE_OPTION_S(mostRecentInputPath, defaultDirectory())
488 LAMEXP_MAKE_OPTION_B(neroAACEnable2Pass, true)
489 LAMEXP_MAKE_OPTION_B(neroAacNotificationsEnabled, true)
490 LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled, false)
491 LAMEXP_MAKE_OPTION_I(normalizationFilterEqualizationMode, 0)
492 LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume, -50)
493 LAMEXP_MAKE_OPTION_I(opusComplexity, 10)
494 LAMEXP_MAKE_OPTION_B(opusDisableResample, false)
495 LAMEXP_MAKE_OPTION_I(opusFramesize, 3)
496 LAMEXP_MAKE_OPTION_I(opusOptimizeFor, 0)
497 LAMEXP_MAKE_OPTION_S(outputDir, defaultDirectory())
498 LAMEXP_MAKE_OPTION_B(outputToSourceDir, false)
499 LAMEXP_MAKE_OPTION_I(overwriteMode, Overwrite_KeepBoth)
500 LAMEXP_MAKE_OPTION_B(prependRelativeSourcePath, false)
501 LAMEXP_MAKE_OPTION_B(renameOutputFilesEnabled, false)
502 LAMEXP_MAKE_OPTION_S(renameOutputFilesPattern, "[<TrackNo>] <Artist> - <Title>")
503 LAMEXP_MAKE_OPTION_I(samplingRate, 0)
504 LAMEXP_MAKE_OPTION_B(shellIntegrationEnabled, !lamexp_portable_mode())
505 LAMEXP_MAKE_OPTION_B(slowStartup, false)
506 LAMEXP_MAKE_OPTION_B(soundsEnabled, true)
507 LAMEXP_MAKE_OPTION_I(toneAdjustBass, 0)
508 LAMEXP_MAKE_OPTION_I(toneAdjustTreble, 0)
509 LAMEXP_MAKE_OPTION_B(writeMetaTags, true)