///////////////////////////////////////////////////////////////////////////////
// LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2015 LoRd_MuldeR <MuldeR2@GMX.de>
//
// 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.
+// (at your option) any later version, but always including the *additional*
+// restrictions defined in the "License.txt" file.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#pragma once
-class QSettings;
+#include <QMutex>
+#include <QScopedPointer>
+
class QString;
+class SettingsCache;
///////////////////////////////////////////////////////////////////////////////
//Enums
enum Encoder
{
- MP3Encoder = 0,
+ MP3Encoder = 0,
VorbisEncoder = 1,
- AACEncoder = 2,
- AC3Encoder = 3,
- FLACEncoder = 4,
- OpusEncoder = 5,
- DCAEncoder = 6,
- PCMEncoder = 7,
- ENCODER_COUNT = 8
+ AACEncoder = 2,
+ AC3Encoder = 3,
+ FLACEncoder = 4,
+ OpusEncoder = 5,
+ DCAEncoder = 6,
+ MACEncoder = 7,
+ PCMEncoder = 8,
+ ENCODER_COUNT = 9
};
enum RCMode
Overwrite_Replaces = 2
};
+ enum AACEncoderType
+ {
+ AAC_ENCODER_NONE = 0,
+ AAC_ENCODER_NERO = 1,
+ AAC_ENCODER_FHG = 2,
+ AAC_ENCODER_QAAC = 3,
+ };
+
//Consts
- static const int mp3Bitrates[15];
- static const int ac3Bitrates[20];
static const int samplingRates[8];
//Getters & setters
LAMEXP_MAKE_OPTION_B(bitrateManagementEnabled)
LAMEXP_MAKE_OPTION_I(bitrateManagementMaxRate)
LAMEXP_MAKE_OPTION_I(bitrateManagementMinRate)
- LAMEXP_MAKE_OPTION_I(compressionBitrateAacEnc)
- LAMEXP_MAKE_OPTION_I(compressionBitrateAften)
- LAMEXP_MAKE_OPTION_I(compressionBitrateDcaEnc)
- LAMEXP_MAKE_OPTION_I(compressionBitrateLAME)
- LAMEXP_MAKE_OPTION_I(compressionBitrateOggEnc)
- LAMEXP_MAKE_OPTION_I(compressionBitrateOpusEnc)
+ LAMEXP_MAKE_OPTION_I(compressionAbrBitrateAacEnc)
+ LAMEXP_MAKE_OPTION_I(compressionAbrBitrateAften)
+ LAMEXP_MAKE_OPTION_I(compressionAbrBitrateDcaEnc)
+ LAMEXP_MAKE_OPTION_I(compressionAbrBitrateFLAC)
+ LAMEXP_MAKE_OPTION_I(compressionAbrBitrateLAME)
+ LAMEXP_MAKE_OPTION_I(compressionAbrBitrateMacEnc)
+ LAMEXP_MAKE_OPTION_I(compressionAbrBitrateOggEnc)
+ LAMEXP_MAKE_OPTION_I(compressionAbrBitrateOpusEnc)
+ LAMEXP_MAKE_OPTION_I(compressionAbrBitrateWave)
+ LAMEXP_MAKE_OPTION_I(compressionCbrBitrateAacEnc)
+ LAMEXP_MAKE_OPTION_I(compressionCbrBitrateAften)
+ LAMEXP_MAKE_OPTION_I(compressionCbrBitrateDcaEnc)
+ LAMEXP_MAKE_OPTION_I(compressionCbrBitrateFLAC)
+ LAMEXP_MAKE_OPTION_I(compressionCbrBitrateLAME)
+ LAMEXP_MAKE_OPTION_I(compressionCbrBitrateMacEnc)
+ LAMEXP_MAKE_OPTION_I(compressionCbrBitrateOggEnc)
+ LAMEXP_MAKE_OPTION_I(compressionCbrBitrateOpusEnc)
+ LAMEXP_MAKE_OPTION_I(compressionCbrBitrateWave)
LAMEXP_MAKE_OPTION_I(compressionEncoder)
LAMEXP_MAKE_OPTION_I(compressionRCModeAacEnc)
LAMEXP_MAKE_OPTION_I(compressionRCModeAften)
+ LAMEXP_MAKE_OPTION_I(compressionRCModeDcaEnc)
+ LAMEXP_MAKE_OPTION_I(compressionRCModeFLAC)
LAMEXP_MAKE_OPTION_I(compressionRCModeLAME)
+ LAMEXP_MAKE_OPTION_I(compressionRCModeMacEnc)
LAMEXP_MAKE_OPTION_I(compressionRCModeOggEnc)
LAMEXP_MAKE_OPTION_I(compressionRCModeOpusEnc)
- LAMEXP_MAKE_OPTION_I(compressionVbrLevelAacEnc)
- LAMEXP_MAKE_OPTION_I(compressionVbrLevelAften)
- LAMEXP_MAKE_OPTION_I(compressionVbrLevelFLAC)
- LAMEXP_MAKE_OPTION_I(compressionVbrLevelLAME)
- LAMEXP_MAKE_OPTION_I(compressionVbrLevelOggEnc)
+ LAMEXP_MAKE_OPTION_I(compressionRCModeWave)
+ LAMEXP_MAKE_OPTION_I(compressionVbrQualityAacEnc)
+ LAMEXP_MAKE_OPTION_I(compressionVbrQualityAften)
+ LAMEXP_MAKE_OPTION_I(compressionVbrQualityDcaEnc)
+ LAMEXP_MAKE_OPTION_I(compressionVbrQualityFLAC)
+ LAMEXP_MAKE_OPTION_I(compressionVbrQualityLAME)
+ LAMEXP_MAKE_OPTION_I(compressionVbrQualityMacEnc)
+ LAMEXP_MAKE_OPTION_I(compressionVbrQualityOggEnc)
+ LAMEXP_MAKE_OPTION_I(compressionVbrQualityOpusEnc)
+ LAMEXP_MAKE_OPTION_I(compressionVbrQualityWave)
LAMEXP_MAKE_OPTION_B(createPlaylist)
LAMEXP_MAKE_OPTION_S(currentLanguage)
LAMEXP_MAKE_OPTION_S(currentLanguageFile)
LAMEXP_MAKE_OPTION_S(customParametersAacEnc)
LAMEXP_MAKE_OPTION_S(customParametersAften)
+ LAMEXP_MAKE_OPTION_S(customParametersDcaEnc)
LAMEXP_MAKE_OPTION_S(customParametersFLAC)
LAMEXP_MAKE_OPTION_S(customParametersLAME)
+ LAMEXP_MAKE_OPTION_S(customParametersMacEnc)
LAMEXP_MAKE_OPTION_S(customParametersOggEnc)
- LAMEXP_MAKE_OPTION_S(customParametersOpus)
+ LAMEXP_MAKE_OPTION_S(customParametersOpusEnc)
+ LAMEXP_MAKE_OPTION_S(customParametersWave)
LAMEXP_MAKE_OPTION_S(customTempPath)
LAMEXP_MAKE_OPTION_B(customTempPathEnabled)
LAMEXP_MAKE_OPTION_B(dropBoxWidgetEnabled)
+ LAMEXP_MAKE_OPTION_I(dropBoxWidgetPositionX)
+ LAMEXP_MAKE_OPTION_I(dropBoxWidgetPositionY)
LAMEXP_MAKE_OPTION_S(favoriteOutputFolders)
LAMEXP_MAKE_OPTION_B(forceStereoDownmix)
LAMEXP_MAKE_OPTION_B(hibernateComputer)
LAMEXP_MAKE_OPTION_B(neroAACEnable2Pass)
LAMEXP_MAKE_OPTION_B(neroAacNotificationsEnabled)
LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled)
- LAMEXP_MAKE_OPTION_I(normalizationFilterEqualizationMode)
+ LAMEXP_MAKE_OPTION_B(normalizationFilterDynamic)
+ LAMEXP_MAKE_OPTION_B(normalizationFilterCoupled)
LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume)
+ LAMEXP_MAKE_OPTION_I(normalizationFilterSize)
LAMEXP_MAKE_OPTION_I(opusComplexity)
LAMEXP_MAKE_OPTION_B(opusDisableResample)
LAMEXP_MAKE_OPTION_I(opusFramesize)
//Misc
void validate(void);
void syncNow(void);
-
+
private:
- QSettings *m_settings;
- static QString *m_defaultLanguage;
+ SettingsModel(const SettingsModel &other) {}
+ SettingsModel &operator=(const SettingsModel &other) { return *this; }
+
QString initDirectory(const QString &path) const;
QString defaultLanguage(void) const;
QString defaultDirectory(void) const;
+
+ SettingsCache *m_configCache;
+
+ mutable QMutex m_defaultLangLock;
+ mutable QScopedPointer<QString> m_defaultLanguage;
};
///////////////////////////////////////////////////////////////////////////////