2010-11-12 19:02:01 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// LameXP - Audio Encoder Front-End
|
2012-01-02 00:52:27 +01:00
|
|
|
// Copyright (C) 2004-2012 LoRd_MuldeR <MuldeR2@GMX.de>
|
2010-11-12 19:02:01 +01:00
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
|
|
// with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
//
|
|
|
|
// http://www.gnu.org/licenses/gpl-2.0.txt
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class QSettings;
|
2010-11-20 02:14:22 +01:00
|
|
|
class QString;
|
2010-11-12 19:02:01 +01:00
|
|
|
|
2011-02-10 16:08:03 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2011-05-03 14:28:06 +02:00
|
|
|
#define LAMEXP_MAKE_OPTION_I(OPT) \
|
2010-11-21 21:51:22 +01:00
|
|
|
int OPT(void); \
|
2011-01-23 02:19:18 +01:00
|
|
|
void OPT(int value); \
|
|
|
|
int OPT##Default(void);
|
2010-11-21 21:51:22 +01:00
|
|
|
|
2011-05-03 14:28:06 +02:00
|
|
|
#define LAMEXP_MAKE_OPTION_S(OPT) \
|
2010-11-21 21:51:22 +01:00
|
|
|
QString OPT(void); \
|
2011-01-23 02:19:18 +01:00
|
|
|
void OPT(const QString &value); \
|
|
|
|
QString OPT##Default(void);
|
2010-11-21 21:51:22 +01:00
|
|
|
|
2011-05-03 14:28:06 +02:00
|
|
|
#define LAMEXP_MAKE_OPTION_B(OPT) \
|
2010-11-21 21:51:22 +01:00
|
|
|
bool OPT(void); \
|
2011-01-23 02:19:18 +01:00
|
|
|
void OPT(bool value); \
|
|
|
|
bool OPT##Default(void);
|
2010-11-15 04:42:06 +01:00
|
|
|
|
2011-05-03 14:28:06 +02:00
|
|
|
#define LAMEXP_MAKE_OPTION_U(OPT) \
|
2011-02-10 16:08:03 +01:00
|
|
|
unsigned int OPT(void); \
|
|
|
|
void OPT(unsigned int value); \
|
|
|
|
unsigned int OPT##Default(void);
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2010-11-12 19:02:01 +01:00
|
|
|
class SettingsModel
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SettingsModel(void);
|
|
|
|
~SettingsModel(void);
|
|
|
|
|
2010-11-15 04:42:06 +01:00
|
|
|
//Enums
|
|
|
|
enum Encoder
|
|
|
|
{
|
|
|
|
MP3Encoder = 0,
|
|
|
|
VorbisEncoder = 1,
|
|
|
|
AACEncoder = 2,
|
2011-05-04 01:15:05 +02:00
|
|
|
AC3Encoder = 3,
|
|
|
|
FLACEncoder = 4,
|
2012-07-20 23:19:08 +02:00
|
|
|
OpusEncoder = 5,
|
|
|
|
DCAEncoder = 6,
|
|
|
|
PCMEncoder = 7
|
2010-11-15 04:42:06 +01:00
|
|
|
};
|
|
|
|
enum RCMode
|
|
|
|
{
|
|
|
|
VBRMode = 0,
|
|
|
|
ABRMode = 1,
|
|
|
|
CBRMode = 2
|
|
|
|
};
|
|
|
|
|
2010-11-15 21:07:58 +01:00
|
|
|
//Consts
|
|
|
|
static const int mp3Bitrates[15];
|
2011-05-05 12:27:25 +02:00
|
|
|
static const int ac3Bitrates[20];
|
2011-01-23 02:19:18 +01:00
|
|
|
static const int samplingRates[8];
|
2010-11-15 21:07:58 +01:00
|
|
|
|
2010-11-21 21:51:22 +01:00
|
|
|
//Getters & setters
|
2011-05-03 14:28:06 +02:00
|
|
|
LAMEXP_MAKE_OPTION_I(licenseAccepted);
|
|
|
|
LAMEXP_MAKE_OPTION_I(interfaceStyle);
|
|
|
|
LAMEXP_MAKE_OPTION_I(compressionEncoder);
|
|
|
|
LAMEXP_MAKE_OPTION_I(compressionRCMode);
|
|
|
|
LAMEXP_MAKE_OPTION_I(compressionBitrate);
|
|
|
|
LAMEXP_MAKE_OPTION_S(outputDir);
|
|
|
|
LAMEXP_MAKE_OPTION_B(outputToSourceDir);
|
|
|
|
LAMEXP_MAKE_OPTION_B(prependRelativeSourcePath);
|
2011-08-08 20:26:30 +02:00
|
|
|
LAMEXP_MAKE_OPTION_S(favoriteOutputFolders);
|
2011-05-03 14:28:06 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(writeMetaTags);
|
|
|
|
LAMEXP_MAKE_OPTION_B(createPlaylist);
|
|
|
|
LAMEXP_MAKE_OPTION_S(autoUpdateLastCheck);
|
|
|
|
LAMEXP_MAKE_OPTION_B(autoUpdateEnabled);
|
|
|
|
LAMEXP_MAKE_OPTION_B(autoUpdateCheckBeta);
|
|
|
|
LAMEXP_MAKE_OPTION_B(soundsEnabled);
|
|
|
|
LAMEXP_MAKE_OPTION_B(neroAacNotificationsEnabled);
|
2011-06-24 18:17:04 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(antivirNotificationsEnabled);
|
2011-05-03 14:28:06 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(dropBoxWidgetEnabled);
|
|
|
|
LAMEXP_MAKE_OPTION_B(shellIntegrationEnabled);
|
|
|
|
LAMEXP_MAKE_OPTION_S(currentLanguage);
|
2012-10-14 22:21:57 +02:00
|
|
|
LAMEXP_MAKE_OPTION_S(currentLanguageFile);
|
2011-05-03 14:28:06 +02:00
|
|
|
LAMEXP_MAKE_OPTION_I(lameAlgoQuality);
|
|
|
|
LAMEXP_MAKE_OPTION_I(lameChannelMode);
|
2011-08-05 21:52:43 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(forceStereoDownmix);
|
2011-05-03 14:28:06 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(bitrateManagementEnabled);
|
|
|
|
LAMEXP_MAKE_OPTION_I(bitrateManagementMinRate);
|
|
|
|
LAMEXP_MAKE_OPTION_I(bitrateManagementMaxRate);
|
|
|
|
LAMEXP_MAKE_OPTION_I(samplingRate);
|
|
|
|
LAMEXP_MAKE_OPTION_B(neroAACEnable2Pass);
|
2011-08-21 14:43:18 +02:00
|
|
|
LAMEXP_MAKE_OPTION_I(aacEncProfile);
|
2011-05-07 00:50:18 +02:00
|
|
|
LAMEXP_MAKE_OPTION_I(aftenAudioCodingMode);
|
|
|
|
LAMEXP_MAKE_OPTION_I(aftenDynamicRangeCompression);
|
|
|
|
LAMEXP_MAKE_OPTION_B(aftenFastBitAllocation);
|
|
|
|
LAMEXP_MAKE_OPTION_I(aftenExponentSearchSize);
|
2012-07-21 19:16:12 +02:00
|
|
|
LAMEXP_MAKE_OPTION_I(opusOptimizeFor);
|
|
|
|
LAMEXP_MAKE_OPTION_I(opusComplexity);
|
|
|
|
LAMEXP_MAKE_OPTION_I(opusFramesize);
|
2012-07-29 16:46:01 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(opusExpAnalysis);
|
2011-05-03 14:28:06 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled);
|
|
|
|
LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume);
|
2011-10-06 23:55:42 +02:00
|
|
|
LAMEXP_MAKE_OPTION_I(normalizationFilterEqualizationMode);
|
2011-05-03 14:28:06 +02:00
|
|
|
LAMEXP_MAKE_OPTION_I(toneAdjustBass);
|
|
|
|
LAMEXP_MAKE_OPTION_I(toneAdjustTreble);
|
|
|
|
LAMEXP_MAKE_OPTION_S(customParametersLAME);
|
|
|
|
LAMEXP_MAKE_OPTION_S(customParametersOggEnc);
|
2011-08-21 14:43:18 +02:00
|
|
|
LAMEXP_MAKE_OPTION_S(customParametersAacEnc);
|
2011-05-05 12:27:25 +02:00
|
|
|
LAMEXP_MAKE_OPTION_S(customParametersAften);
|
2011-05-03 14:28:06 +02:00
|
|
|
LAMEXP_MAKE_OPTION_S(customParametersFLAC);
|
2012-07-29 22:55:02 +02:00
|
|
|
LAMEXP_MAKE_OPTION_S(customParametersOpus);
|
2011-08-04 23:26:38 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(renameOutputFilesEnabled);
|
|
|
|
LAMEXP_MAKE_OPTION_S(renameOutputFilesPattern);
|
2011-05-03 14:28:06 +02:00
|
|
|
LAMEXP_MAKE_OPTION_U(metaInfoPosition);
|
|
|
|
LAMEXP_MAKE_OPTION_U(maximumInstances);
|
|
|
|
LAMEXP_MAKE_OPTION_S(customTempPath);
|
|
|
|
LAMEXP_MAKE_OPTION_B(customTempPathEnabled);
|
2011-06-24 18:17:04 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(slowStartup);
|
2011-08-23 18:48:16 +02:00
|
|
|
LAMEXP_MAKE_OPTION_S(mostRecentInputPath);
|
2011-10-22 01:13:28 +02:00
|
|
|
LAMEXP_MAKE_OPTION_B(hibernateComputer);
|
2010-11-15 04:42:06 +01:00
|
|
|
|
2010-11-21 21:51:22 +01:00
|
|
|
//Misc
|
2010-11-15 04:42:06 +01:00
|
|
|
void validate(void);
|
2012-10-10 23:01:58 +02:00
|
|
|
void syncNow(void);
|
2011-08-26 16:32:25 +02:00
|
|
|
|
2010-11-12 19:02:01 +01:00
|
|
|
private:
|
|
|
|
QSettings *m_settings;
|
2011-01-02 01:09:05 +01:00
|
|
|
QString *m_defaultLanguage;
|
|
|
|
QString defaultLanguage(void);
|
2011-08-26 16:32:25 +02:00
|
|
|
QString initDirectory(const QString &path);
|
2010-11-12 19:02:01 +01:00
|
|
|
};
|
2010-11-15 04:42:06 +01:00
|
|
|
|
2011-02-10 16:08:03 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2011-05-03 14:28:06 +02:00
|
|
|
#undef LAMEXP_MAKE_OPTION_I
|
|
|
|
#undef LAMEXP_MAKE_OPTION_S
|
|
|
|
#undef LAMEXP_MAKE_OPTION_B
|
|
|
|
#undef LAMEXP_MAKE_OPTION_U
|