OSDN Git Service

Updated Monkey's Audio binary to v4.11 (2013-01-20), including STDERR flush fix.
[lamexp/LameXP.git] / src / Model_Settings.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
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.
9 //
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.
14 //
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.
18 //
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
21
22 #include "Model_Settings.h"
23
24 #include "Global.h"
25
26 #include <QSettings>
27 #include <QDesktopServices>
28 #include <QApplication>
29 #include <QString>
30 #include <QFileInfo>
31 #include <QDir>
32 #include <QStringList>
33 #include <QLocale>
34 #include <QRegExp>
35 #include <QReadWriteLock>
36 #include <QReadLocker>
37 #include <QWriteLocker>
38
39 ////////////////////////////////////////////////////////////
40 //Macros
41 ////////////////////////////////////////////////////////////
42
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; }
47
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; }
52
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; }
57
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; }
62
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();
65
66 ////////////////////////////////////////////////////////////
67 //Constants
68 ////////////////////////////////////////////////////////////
69
70 //Setting ID's
71 LAMEXP_MAKE_ID(versionNumber, "VersionNumber");
72 LAMEXP_MAKE_ID(licenseAccepted, "LicenseAccepted");
73 LAMEXP_MAKE_ID(interfaceStyle, "InterfaceStyle");
74 LAMEXP_MAKE_ID(compressionEncoder, "Compression/Encoder");
75 LAMEXP_MAKE_ID(compressionRCMode, "Compression/RCMode");
76 LAMEXP_MAKE_ID(compressionBitrate, "Compression/Bitrate");
77 LAMEXP_MAKE_ID(outputDir, "OutputDirectory/SelectedPath");
78 LAMEXP_MAKE_ID(outputToSourceDir, "OutputDirectory/OutputToSourceFolder");
79 LAMEXP_MAKE_ID(prependRelativeSourcePath, "OutputDirectory/PrependRelativeSourcePath");
80 LAMEXP_MAKE_ID(favoriteOutputFolders, "OutputDirectory/Favorites");
81 LAMEXP_MAKE_ID(mostRecentInputPath, "InputDirectory/MostRecentPath");
82 LAMEXP_MAKE_ID(writeMetaTags, "Flags/WriteMetaTags");
83 LAMEXP_MAKE_ID(createPlaylist, "Flags/AutoCreatePlaylist");
84 LAMEXP_MAKE_ID(autoUpdateLastCheck, "AutoUpdate/LastCheck");
85 LAMEXP_MAKE_ID(autoUpdateEnabled, "AutoUpdate/Enabled");
86 LAMEXP_MAKE_ID(autoUpdateCheckBeta, "AutoUpdate/CheckForBetaVersions");
87 LAMEXP_MAKE_ID(soundsEnabled, "Flags/EnableSounds");
88 LAMEXP_MAKE_ID(neroAacNotificationsEnabled, "Flags/EnableNeroAacNotifications");
89 LAMEXP_MAKE_ID(antivirNotificationsEnabled, "Flags/EnableAntivirusNotifications");
90 LAMEXP_MAKE_ID(dropBoxWidgetEnabled, "Flags/EnableDropBoxWidget");
91 LAMEXP_MAKE_ID(shellIntegrationEnabled, "Flags/EnableShellIntegration");
92 LAMEXP_MAKE_ID(currentLanguage, "Localization/Language");
93 LAMEXP_MAKE_ID(currentLanguageFile, "Localization/UseQMFile");
94 LAMEXP_MAKE_ID(lameAlgoQuality, "AdvancedOptions/LAME/AlgorithmQuality");
95 LAMEXP_MAKE_ID(lameChannelMode, "AdvancedOptions/LAME/ChannelMode");
96 LAMEXP_MAKE_ID(forceStereoDownmix, "AdvancedOptions/StereoDownmix/Force");
97 LAMEXP_MAKE_ID(bitrateManagementEnabled, "AdvancedOptions/BitrateManagement/Enabled");
98 LAMEXP_MAKE_ID(bitrateManagementMinRate, "AdvancedOptions/BitrateManagement/MinRate");
99 LAMEXP_MAKE_ID(bitrateManagementMaxRate, "AdvancedOptions/BitrateManagement/MaxRate");
100 LAMEXP_MAKE_ID(aftenAudioCodingMode, "AdvancedOptions/Aften/AudioCodingMode");
101 LAMEXP_MAKE_ID(aftenDynamicRangeCompression, "AdvancedOptions/Aften/DynamicRangeCompression");
102 LAMEXP_MAKE_ID(aftenFastBitAllocation, "AdvancedOptions/Aften/FastBitAllocation");
103 LAMEXP_MAKE_ID(aftenExponentSearchSize, "AdvancedOptions/Aften/ExponentSearchSize");
104 LAMEXP_MAKE_ID(samplingRate, "AdvancedOptions/Common/Resampling");
105 LAMEXP_MAKE_ID(neroAACEnable2Pass, "AdvancedOptions/AACEnc/Enable2Pass");
106 LAMEXP_MAKE_ID(aacEncProfile, "AdvancedOptions/AACEnc/ForceProfile");
107 LAMEXP_MAKE_ID(opusOptimizeFor, "AdvancedOptions/Opus/OptimizeForSignalType");
108 LAMEXP_MAKE_ID(opusComplexity, "AdvancedOptions/Opus/EncodingComplexity");
109 LAMEXP_MAKE_ID(opusFramesize, "AdvancedOptions/Opus/FrameSize");
110 LAMEXP_MAKE_ID(opusDisableResample, "AdvancedOptions/Opus/DisableResample");
111 LAMEXP_MAKE_ID(normalizationFilterEnabled, "AdvancedOptions/VolumeNormalization/Enabled");
112 LAMEXP_MAKE_ID(normalizationFilterMaxVolume, "AdvancedOptions/VolumeNormalization/MaxVolume");
113 LAMEXP_MAKE_ID(normalizationFilterEqualizationMode, "AdvancedOptions/VolumeNormalization/EqualizationMode");
114 LAMEXP_MAKE_ID(toneAdjustBass, "AdvancedOptions/ToneAdjustment/Bass");
115 LAMEXP_MAKE_ID(toneAdjustTreble, "AdvancedOptions/ToneAdjustment/Treble");
116 LAMEXP_MAKE_ID(customParametersLAME, "AdvancedOptions/CustomParameters/LAME");
117 LAMEXP_MAKE_ID(customParametersOggEnc, "AdvancedOptions/CustomParameters/OggEnc");
118 LAMEXP_MAKE_ID(customParametersAacEnc, "AdvancedOptions/CustomParameters/AacEnc");
119 LAMEXP_MAKE_ID(customParametersAften, "AdvancedOptions/CustomParameters/Aften");
120 LAMEXP_MAKE_ID(customParametersFLAC, "AdvancedOptions/CustomParameters/FLAC");
121 LAMEXP_MAKE_ID(customParametersOpus, "AdvancedOptions/CustomParameters/OpusEnc");
122 LAMEXP_MAKE_ID(renameOutputFilesEnabled, "AdvancedOptions/RenameOutputFiles/Enabled");
123 LAMEXP_MAKE_ID(renameOutputFilesPattern, "AdvancedOptions/RenameOutputFiles/Pattern");
124 LAMEXP_MAKE_ID(overwriteMode, "AdvancedOptions/OverwriteMode");
125 LAMEXP_MAKE_ID(hibernateComputer, "AdvancedOptions/HibernateComputerOnShutdown");
126 LAMEXP_MAKE_ID(metaInfoPosition, "MetaInformation/PlaylistPosition");
127 LAMEXP_MAKE_ID(maximumInstances, "AdvancedOptions/Threading/MaximumInstances");
128 LAMEXP_MAKE_ID(customTempPath, "AdvancedOptions/TempDirectory/CustomPath");
129 LAMEXP_MAKE_ID(customTempPathEnabled, "AdvancedOptions/TempDirectory/UseCustomPath");
130 LAMEXP_MAKE_ID(slowStartup, "Flags/SlowStartupDetected");
131
132 //LUT
133 const int SettingsModel::mp3Bitrates[15] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1};
134 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};
135 const int SettingsModel::samplingRates[8] = {0, 16000, 22050, 24000, 32000, 44100, 48000, -1};
136
137 static QReadWriteLock s_lock;
138
139 ////////////////////////////////////////////////////////////
140 // Constructor
141 ////////////////////////////////////////////////////////////
142
143 SettingsModel::SettingsModel(void)
144 {
145         QString configPath = "LameXP.ini";
146         
147         if(!lamexp_portable_mode())
148         {
149                 QString dataPath = initDirectory(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
150                 if(!dataPath.isEmpty())
151                 {
152                         configPath = QString("%1/config.ini").arg(QDir(dataPath).canonicalPath());
153                 }
154                 else
155                 {
156                         qWarning("SettingsModel: DataLocation could not be initialized!");
157                         dataPath = initDirectory(QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
158                         if(!dataPath.isEmpty())
159                         {
160                                 configPath = QString("%1/LameXP.ini").arg(QDir(dataPath).canonicalPath());
161                         }
162                 }
163         }
164         else
165         {
166                 qDebug("LameXP is running in \"portable\" mode -> config in application dir!\n");
167                 QString appPath = QFileInfo(QApplication::applicationFilePath()).canonicalFilePath();
168                 if(appPath.isEmpty())
169                 {
170                         appPath = QFileInfo(QApplication::applicationFilePath()).absoluteFilePath();
171                 }
172                 if(QFileInfo(appPath).exists() && QFileInfo(appPath).isFile())
173                 {
174                         configPath = QString("%1/%2.ini").arg(QFileInfo(appPath).absolutePath(), QFileInfo(appPath).completeBaseName());
175                 }
176         }
177
178         m_settings = new QSettings(configPath, QSettings::IniFormat);
179         const QString groupKey = QString().sprintf("LameXP_%u%02u%05u", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build());
180         QStringList childGroups = m_settings->childGroups();
181
182         while(!childGroups.isEmpty())
183         {
184                 QString current = childGroups.takeFirst();
185                 QRegExp filter("^LameXP_(\\d+)(\\d\\d)(\\d\\d\\d\\d\\d)$");
186                 if(filter.indexIn(current) >= 0)
187                 {
188                         bool ok = false;
189                         unsigned int temp = filter.cap(3).toUInt(&ok) + 10;
190                         if(ok && (temp >= lamexp_version_build()))
191                         {
192                                 continue;
193                         }
194                 }
195                 qWarning("Deleting obsolete group from config: %s", current.toUtf8().constData());
196                 REMOVE_GROUP(m_settings, current);
197         }
198
199         m_settings->beginGroup(groupKey);
200         m_settings->setValue(g_settingsId_versionNumber, QApplication::applicationVersion());
201         m_settings->sync();
202 }
203
204 ////////////////////////////////////////////////////////////
205 // Destructor
206 ////////////////////////////////////////////////////////////
207
208 SettingsModel::~SettingsModel(void)
209 {
210         LAMEXP_DELETE(m_settings);
211         LAMEXP_DELETE(m_defaultLanguage);
212 }
213
214 ////////////////////////////////////////////////////////////
215 // Public Functions
216 ////////////////////////////////////////////////////////////
217
218 void SettingsModel::validate(void)
219 {
220         if(this->compressionEncoder() < SettingsModel::MP3Encoder || this->compressionEncoder() > SettingsModel::PCMEncoder)
221         {
222                 this->compressionEncoder(SettingsModel::MP3Encoder);
223         }
224         
225         if(this->compressionRCMode() < SettingsModel::VBRMode || this->compressionRCMode() > SettingsModel::CBRMode)
226         {
227                 this->compressionEncoder(SettingsModel::VBRMode);
228         }
229         
230         if(!(lamexp_check_tool("neroAacEnc.exe") && lamexp_check_tool("neroAacDec.exe") && lamexp_check_tool("neroAacTag.exe")))
231         {
232                 if(!(lamexp_check_tool("fhgaacenc.exe") && lamexp_check_tool("enc_fhgaac.dll")))
233                 {
234                         if(!(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxrate.dll")))
235                         {
236                                 if(this->compressionEncoder() == SettingsModel::AACEncoder)
237                                 {
238                                         qWarning("AAC encoder selected, but not available any more. Reverting to MP3!");
239                                         this->compressionEncoder(SettingsModel::MP3Encoder);
240                                 }
241                         }
242                 }
243         }
244         
245         if(this->outputDir().isEmpty() || !QFileInfo(this->outputDir()).isDir())
246         {
247                 QString musicLocation = QDesktopServices::storageLocation(QDesktopServices::MusicLocation);
248                 this->outputDir(musicLocation.isEmpty() ? QDesktopServices::storageLocation(QDesktopServices::HomeLocation) : musicLocation);
249         }
250
251         if(this->mostRecentInputPath().isEmpty() || !QFileInfo(this->mostRecentInputPath()).isDir())
252         {
253                 QString musicLocation = QDesktopServices::storageLocation(QDesktopServices::MusicLocation);
254                 this->outputDir(musicLocation.isEmpty() ? QDesktopServices::storageLocation(QDesktopServices::HomeLocation) : musicLocation);
255         }
256
257         if(!this->currentLanguageFile().isEmpty())
258         {
259                 const QString qmPath = QFileInfo(this->currentLanguageFile()).canonicalFilePath();
260                 if(qmPath.isEmpty() || (!(QFileInfo(qmPath).exists() && QFileInfo(qmPath).isFile() && (QFileInfo(qmPath).suffix().compare("qm", Qt::CaseInsensitive) == 0))))
261                 {
262                         qWarning("Current language file missing, reverting to built-in translator!");
263                         this->currentLanguageFile(QString());
264                 }
265         }
266
267         if(!lamexp_query_translations().contains(this->currentLanguage(), Qt::CaseInsensitive))
268         {
269                 qWarning("Current language \"%s\" is unknown, reverting to default language!", this->currentLanguage().toLatin1().constData());
270                 this->currentLanguage(defaultLanguage());
271         }
272
273         if(this->hibernateComputer())
274         {
275                 if(!lamexp_is_hibernation_supported())
276                 {
277                         this->hibernateComputer(false);
278                 }
279         }
280
281         if(this->overwriteMode() < SettingsModel::Overwrite_KeepBoth || this->overwriteMode() > SettingsModel::Overwrite_Replaces)
282         {
283                 this->overwriteMode(SettingsModel::Overwrite_KeepBoth);
284         }
285
286 }
287
288 void SettingsModel::syncNow(void)
289 {
290         m_settings->sync();
291 }
292
293 ////////////////////////////////////////////////////////////
294 // Private Functions
295 ////////////////////////////////////////////////////////////
296
297 QString *SettingsModel::m_defaultLanguage = NULL;
298
299 QString SettingsModel::defaultLanguage(void) const
300 {
301         QReadLocker readLock(&s_lock);
302         
303         if(m_defaultLanguage)
304         {
305                 return *m_defaultLanguage;
306         }
307         
308         //Acquire write lock now
309         readLock.unlock();
310         QWriteLocker writeLock(&s_lock);
311         
312         //Detect system langauge
313         QLocale systemLanguage= QLocale::system();
314         qDebug("[Locale]");
315         qDebug("Language: %s (%d)", QLocale::languageToString(systemLanguage.language()).toUtf8().constData(), systemLanguage.language());
316         qDebug("Country is: %s (%d)", QLocale::countryToString(systemLanguage.country()).toUtf8().constData(), systemLanguage.country());
317         qDebug("Script is: %s (%d)\n", QLocale::scriptToString(systemLanguage.script()).toUtf8().constData(), systemLanguage.script());
318
319         //Check if we can use the default translation
320         if(systemLanguage.language() == QLocale::English /*|| systemLanguage.language() == QLocale::C*/)
321         {
322                 m_defaultLanguage = new QString(LAMEXP_DEFAULT_LANGID);
323                 return LAMEXP_DEFAULT_LANGID;
324         }
325
326         //Try to find a suitable translation for the user's system language *and* country
327         QStringList languages = lamexp_query_translations();
328         while(!languages.isEmpty())
329         {
330                 QString currentLangId = languages.takeFirst();
331                 if(lamexp_translation_sysid(currentLangId) == systemLanguage.language())
332                 {
333                         if(lamexp_translation_country(currentLangId) == systemLanguage.country())
334                         {
335                                 m_defaultLanguage = new QString(currentLangId);
336                                 return currentLangId;
337                         }
338                 }
339         }
340
341         //Try to find a suitable translation for the user's system language
342         languages = lamexp_query_translations();
343         while(!languages.isEmpty())
344         {
345                 QString currentLangId = languages.takeFirst();
346                 if(lamexp_translation_sysid(currentLangId) == systemLanguage.language())
347                 {
348                         m_defaultLanguage = new QString(currentLangId);
349                         return currentLangId;
350                 }
351         }
352
353         //Fall back to the default translation
354         m_defaultLanguage = new QString(LAMEXP_DEFAULT_LANGID);
355         return LAMEXP_DEFAULT_LANGID;
356 }
357
358 QString SettingsModel::initDirectory(const QString &path)
359 {
360         if(path.isEmpty())
361         {
362                 return QString();
363         }
364
365         if(!QDir(path).exists())
366         {
367                 for(int i = 0; i < 32; i++)
368                 {
369                         if(QDir(path).mkpath(".")) break;
370                         Sleep(1);
371                 }
372         }
373
374         if(!QDir(path).exists())
375         {
376                 return QString();
377         }
378         
379         return QDir(path).canonicalPath();
380 }
381
382 ////////////////////////////////////////////////////////////
383 // Getter and Setter
384 ////////////////////////////////////////////////////////////
385
386 LAMEXP_MAKE_OPTION_I(licenseAccepted, 0)
387 LAMEXP_MAKE_OPTION_I(interfaceStyle, 0)
388 LAMEXP_MAKE_OPTION_I(compressionEncoder, 0)
389 LAMEXP_MAKE_OPTION_I(compressionRCMode, 0)
390 LAMEXP_MAKE_OPTION_I(compressionBitrate, 7)
391 LAMEXP_MAKE_OPTION_S(outputDir, QDesktopServices::storageLocation(QDesktopServices::MusicLocation))
392 LAMEXP_MAKE_OPTION_B(outputToSourceDir, false)
393 LAMEXP_MAKE_OPTION_B(prependRelativeSourcePath, false)
394 LAMEXP_MAKE_OPTION_S(favoriteOutputFolders, QString());
395 LAMEXP_MAKE_OPTION_B(writeMetaTags, true)
396 LAMEXP_MAKE_OPTION_B(createPlaylist, true)
397 LAMEXP_MAKE_OPTION_S(autoUpdateLastCheck, "Never")
398 LAMEXP_MAKE_OPTION_B(autoUpdateEnabled, true)
399 LAMEXP_MAKE_OPTION_B(autoUpdateCheckBeta, false)
400 LAMEXP_MAKE_OPTION_B(soundsEnabled, true)
401 LAMEXP_MAKE_OPTION_B(neroAacNotificationsEnabled, true)
402 LAMEXP_MAKE_OPTION_B(antivirNotificationsEnabled, true)
403 LAMEXP_MAKE_OPTION_B(dropBoxWidgetEnabled, true)
404 LAMEXP_MAKE_OPTION_B(shellIntegrationEnabled, !lamexp_portable_mode())
405 LAMEXP_MAKE_OPTION_S(currentLanguage, defaultLanguage())
406 LAMEXP_MAKE_OPTION_S(currentLanguageFile, QString())
407 LAMEXP_MAKE_OPTION_I(lameAlgoQuality, 2)
408 LAMEXP_MAKE_OPTION_I(lameChannelMode, 0)
409 LAMEXP_MAKE_OPTION_B(forceStereoDownmix, false)
410 LAMEXP_MAKE_OPTION_B(bitrateManagementEnabled, false)
411 LAMEXP_MAKE_OPTION_I(bitrateManagementMinRate, 32)
412 LAMEXP_MAKE_OPTION_I(bitrateManagementMaxRate, 500)
413 LAMEXP_MAKE_OPTION_I(samplingRate, 0)
414 LAMEXP_MAKE_OPTION_B(neroAACEnable2Pass, true)
415 LAMEXP_MAKE_OPTION_I(aacEncProfile, 0)
416 LAMEXP_MAKE_OPTION_I(aftenAudioCodingMode, 0);
417 LAMEXP_MAKE_OPTION_I(aftenDynamicRangeCompression, 5);
418 LAMEXP_MAKE_OPTION_B(aftenFastBitAllocation, false);
419 LAMEXP_MAKE_OPTION_I(aftenExponentSearchSize, 8);
420 LAMEXP_MAKE_OPTION_I(opusOptimizeFor, 0);
421 LAMEXP_MAKE_OPTION_I(opusComplexity, 10);
422 LAMEXP_MAKE_OPTION_I(opusFramesize, 3);
423 LAMEXP_MAKE_OPTION_B(opusDisableResample, false);
424 LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled, false)
425 LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume, -50)
426 LAMEXP_MAKE_OPTION_I(normalizationFilterEqualizationMode, 0);
427 LAMEXP_MAKE_OPTION_I(toneAdjustBass, 0)
428 LAMEXP_MAKE_OPTION_I(toneAdjustTreble, 0)
429 LAMEXP_MAKE_OPTION_S(customParametersLAME, QString());
430 LAMEXP_MAKE_OPTION_S(customParametersOggEnc, QString());
431 LAMEXP_MAKE_OPTION_S(customParametersAacEnc, QString());
432 LAMEXP_MAKE_OPTION_S(customParametersAften, QString());
433 LAMEXP_MAKE_OPTION_S(customParametersFLAC, QString());
434 LAMEXP_MAKE_OPTION_S(customParametersOpus, QString());
435 LAMEXP_MAKE_OPTION_B(renameOutputFilesEnabled, false);
436 LAMEXP_MAKE_OPTION_S(renameOutputFilesPattern, "[<TrackNo>] <Artist> - <Title>");
437 LAMEXP_MAKE_OPTION_I(overwriteMode, Overwrite_KeepBoth);
438 LAMEXP_MAKE_OPTION_U(metaInfoPosition, UINT_MAX);
439 LAMEXP_MAKE_OPTION_U(maximumInstances, 0);
440 LAMEXP_MAKE_OPTION_S(customTempPath, QDesktopServices::storageLocation(QDesktopServices::TempLocation));
441 LAMEXP_MAKE_OPTION_B(customTempPathEnabled, false);
442 LAMEXP_MAKE_OPTION_B(slowStartup, false);
443 LAMEXP_MAKE_OPTION_S(mostRecentInputPath, QDesktopServices::storageLocation(QDesktopServices::MusicLocation));
444 LAMEXP_MAKE_OPTION_B(hibernateComputer, false);