Added support for custom encoder parameters.

This commit is contained in:
LoRd_MuldeR 2011-02-09 23:36:17 +01:00
parent fb77806ada
commit cfb20fe3cb
19 changed files with 499 additions and 13 deletions

View File

@ -581,6 +581,30 @@
<source>Adjust Bass (dB):</source> <source>Adjust Bass (dB):</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source> Custom Encoder Parameters </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LAME:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OggEnc2:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nero AAC:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>FLAC:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Warning: Custom parameters won&apos;t be checked at all. Use them at your own risk !!!</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Reset Advanced Options </source> <source>Reset Advanced Options </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

View File

@ -1122,6 +1122,30 @@
<source>The LameXP shell integration has been re-enabled.</source> <source>The LameXP shell integration has been re-enabled.</source>
<translation>Die LameXP Shell-Integration wurde wieder aktiviert.</translation> <translation>Die LameXP Shell-Integration wurde wieder aktiviert.</translation>
</message> </message>
<message>
<source> Custom Encoder Parameters </source>
<translation> Benutzerdefinierte Parameter </translation>
</message>
<message>
<source>LAME:</source>
<translation></translation>
</message>
<message>
<source>OggEnc2:</source>
<translation></translation>
</message>
<message>
<source>Nero AAC:</source>
<translation></translation>
</message>
<message>
<source>FLAC:</source>
<translation></translation>
</message>
<message>
<source>Warning: Custom parameters won&apos;t be checked at all. Use them at your own risk !!!</source>
<translation>Achtung: Benutzerdefinierte Parameter werden nicht überprüft. Benutzung auf eigene Gefahr !!!</translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1122,6 +1122,30 @@
<source>The LameXP shell integration has been re-enabled.</source> <source>The LameXP shell integration has been re-enabled.</source>
<translation>Menú contextual de LameXP habilitado.</translation> <translation>Menú contextual de LameXP habilitado.</translation>
</message> </message>
<message>
<source> Custom Encoder Parameters </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LAME:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OggEnc2:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nero AAC:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>FLAC:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Warning: Custom parameters won&apos;t be checked at all. Use them at your own risk !!!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1124,6 +1124,30 @@ Votre dossier TEMP est situé ici:</translation>
<source>The LameXP shell integration has been re-enabled.</source> <source>The LameXP shell integration has been re-enabled.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source> Custom Encoder Parameters </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LAME:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OggEnc2:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nero AAC:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>FLAC:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Warning: Custom parameters won&apos;t be checked at all. Use them at your own risk !!!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -1122,6 +1122,30 @@
<source>The LameXP shell integration has been re-enabled.</source> <source>The LameXP shell integration has been re-enabled.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source> Custom Encoder Parameters </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LAME:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>OggEnc2:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nero AAC:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>FLAC:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Warning: Custom parameters won&apos;t be checked at all. Use them at your own risk !!!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>MetaInfo</name> <name>MetaInfo</name>

View File

@ -94,6 +94,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/add.png</normaloff>:/icons/add.png</iconset> <normaloff>:/icons/add.png</normaloff>:/icons/add.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -111,6 +117,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset> <normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -128,6 +140,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/bin.png</normaloff>:/icons/bin.png</iconset> <normaloff>:/icons/bin.png</normaloff>:/icons/bin.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -155,6 +173,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/arrow_up.png</normaloff>:/icons/arrow_up.png</iconset> <normaloff>:/icons/arrow_up.png</normaloff>:/icons/arrow_up.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -166,6 +190,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/arrow_down.png</normaloff>:/icons/arrow_down.png</iconset> <normaloff>:/icons/arrow_down.png</normaloff>:/icons/arrow_down.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -212,6 +242,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/zoom.png</normaloff>:/icons/zoom.png</iconset> <normaloff>:/icons/zoom.png</normaloff>:/icons/zoom.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -317,6 +353,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/house.png</normaloff>:/icons/house.png</iconset> <normaloff>:/icons/house.png</normaloff>:/icons/house.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -334,6 +376,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/music.png</normaloff>:/icons/music.png</iconset> <normaloff>:/icons/music.png</normaloff>:/icons/music.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -351,6 +399,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/monitor.png</normaloff>:/icons/monitor.png</iconset> <normaloff>:/icons/monitor.png</normaloff>:/icons/monitor.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -381,6 +435,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/folder_add.png</normaloff>:/icons/folder_add.png</iconset> <normaloff>:/icons/folder_add.png</normaloff>:/icons/folder_add.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -502,6 +562,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/table_edit.png</normaloff>:/icons/table_edit.png</iconset> <normaloff>:/icons/table_edit.png</normaloff>:/icons/table_edit.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
@ -548,6 +614,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/bomb.png</normaloff>:/icons/bomb.png</iconset> <normaloff>:/icons/bomb.png</normaloff>:/icons/bomb.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -985,8 +1057,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>602</width> <width>604</width>
<height>609</height> <height>812</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_22"> <layout class="QGridLayout" name="gridLayout_22">
@ -1894,12 +1966,6 @@
</item> </item>
<item row="1" column="7"> <item row="1" column="7">
<widget class="QPushButton" name="buttonToneAdjustReset"> <widget class="QPushButton" name="buttonToneAdjustReset">
<property name="maximumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
@ -1907,6 +1973,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/cross.png</normaloff>:/icons/cross.png</iconset> <normaloff>:/icons/cross.png</normaloff>:/icons/cross.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="7"> <item row="0" column="1" colspan="7">
@ -1946,6 +2018,199 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="6" column="0">
<widget class="QGroupBox" name="groupBox_11">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="title">
<string> Custom Encoder Parameters </string>
</property>
<layout class="QGridLayout" name="gridLayout_30">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_29">
<item row="1" column="2">
<widget class="QLineEdit" name="lineEditCustomParamLAME">
<property name="font">
<font>
<family>Lucida Console</family>
</font>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="lineEditCustomParamOggEnc">
<property name="font">
<font>
<family>Lucida Console</family>
</font>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLineEdit" name="lineEditCustomParamFLAC">
<property name="font">
<font>
<family>Lucida Console</family>
</font>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="lineEditCustomParamNeroAAC">
<property name="font">
<font>
<family>Lucida Console</family>
</font>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_9">
<property name="text">
<string>LAME:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_10">
<property name="text">
<string>OggEnc2:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Nero AAC:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_12">
<property name="text">
<string>FLAC:</string>
</property>
</widget>
</item>
<item row="1" column="0" rowspan="4">
<spacer name="horizontalSpacer_33">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="3" rowspan="4">
<spacer name="horizontalSpacer_34">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="2">
<spacer name="verticalSpacer_15">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="1" colspan="2">
<spacer name="verticalSpacer_16">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="labelCustomParamsIcon">
<property name="maximumSize">
<size>
<width>18</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../res/Icons.qrc">:/icons/error.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelCustomParamsText">
<property name="text">
<string>Warning: Custom parameters won't be checked at all. Use them at your own risk !!!</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="1" colspan="2">
<widget class="QLabel" name="labelCustomParamsSpacer">
<property name="minimumSize">
<size>
<width>0</width>
<height>2</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>2</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="6" column="0"> <item row="6" column="0">
@ -1987,6 +2252,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/bomb.png</normaloff>:/icons/bomb.png</iconset> <normaloff>:/icons/bomb.png</normaloff>:/icons/bomb.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -2047,6 +2318,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/play.png</normaloff>:/icons/play.png</iconset> <normaloff>:/icons/play.png</normaloff>:/icons/play.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -2077,6 +2354,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/information.png</normaloff>:/icons/information.png</iconset> <normaloff>:/icons/information.png</normaloff>:/icons/information.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -2107,6 +2390,12 @@
<iconset resource="../res/Icons.qrc"> <iconset resource="../res/Icons.qrc">
<normaloff>:/icons/door_in.png</normaloff>:/icons/door_in.png</iconset> <normaloff>:/icons/door_in.png</normaloff>:/icons/door_in.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -2493,6 +2782,14 @@
<include location="../res/Icons.qrc"/> <include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/> <include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/> <include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>

Binary file not shown.

View File

@ -25,7 +25,7 @@
#define VER_LAMEXP_MAJOR 4 #define VER_LAMEXP_MAJOR 4
#define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 0 #define VER_LAMEXP_MINOR_LO 0
#define VER_LAMEXP_BUILD 298 #define VER_LAMEXP_BUILD 300
#define VER_LAMEXP_SUFFIX Beta-4 #define VER_LAMEXP_SUFFIX Beta-4
/* /*

View File

@ -217,6 +217,10 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
while(checkBoxBitrateManagement->isChecked() != m_settings->bitrateManagementEnabled()) checkBoxBitrateManagement->click(); while(checkBoxBitrateManagement->isChecked() != m_settings->bitrateManagementEnabled()) checkBoxBitrateManagement->click();
while(checkBoxNeroAAC2PassMode->isChecked() != m_settings->neroAACEnable2Pass()) checkBoxNeroAAC2PassMode->click(); while(checkBoxNeroAAC2PassMode->isChecked() != m_settings->neroAACEnable2Pass()) checkBoxNeroAAC2PassMode->click();
while(checkBoxNormalizationFilter->isChecked() != m_settings->normalizationFilterEnabled()) checkBoxNormalizationFilter->click(); while(checkBoxNormalizationFilter->isChecked() != m_settings->normalizationFilterEnabled()) checkBoxNormalizationFilter->click();
lineEditCustomParamLAME->setText(m_settings->customParametersLAME());
lineEditCustomParamOggEnc->setText(m_settings->customParametersOggEnc());
lineEditCustomParamNeroAAC->setText(m_settings->customParametersNeroAAC());
lineEditCustomParamFLAC->setText(m_settings->customParametersFLAC());
connect(sliderLameAlgoQuality, SIGNAL(valueChanged(int)), this, SLOT(updateLameAlgoQuality(int))); connect(sliderLameAlgoQuality, SIGNAL(valueChanged(int)), this, SLOT(updateLameAlgoQuality(int)));
connect(checkBoxBitrateManagement, SIGNAL(clicked(bool)), this, SLOT(bitrateManagementEnabledChanged(bool))); connect(checkBoxBitrateManagement, SIGNAL(clicked(bool)), this, SLOT(bitrateManagementEnabledChanged(bool)));
connect(spinBoxBitrateManagementMin, SIGNAL(valueChanged(int)), this, SLOT(bitrateManagementMinChanged(int))); connect(spinBoxBitrateManagementMin, SIGNAL(valueChanged(int)), this, SLOT(bitrateManagementMinChanged(int)));
@ -230,10 +234,15 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
connect(spinBoxToneAdjustBass, SIGNAL(valueChanged(double)), this, SLOT(toneAdjustBassChanged(double))); connect(spinBoxToneAdjustBass, SIGNAL(valueChanged(double)), this, SLOT(toneAdjustBassChanged(double)));
connect(spinBoxToneAdjustTreble, SIGNAL(valueChanged(double)), this, SLOT(toneAdjustTrebleChanged(double))); connect(spinBoxToneAdjustTreble, SIGNAL(valueChanged(double)), this, SLOT(toneAdjustTrebleChanged(double)));
connect(buttonToneAdjustReset, SIGNAL(clicked()), this, SLOT(toneAdjustTrebleReset())); connect(buttonToneAdjustReset, SIGNAL(clicked()), this, SLOT(toneAdjustTrebleReset()));
connect(lineEditCustomParamLAME, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
connect(lineEditCustomParamOggEnc, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
connect(lineEditCustomParamNeroAAC, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
connect(lineEditCustomParamFLAC, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
connect(buttonResetAdvancedOptions, SIGNAL(clicked()), this, SLOT(resetAdvancedOptionsButtonClicked())); connect(buttonResetAdvancedOptions, SIGNAL(clicked()), this, SLOT(resetAdvancedOptionsButtonClicked()));
updateLameAlgoQuality(sliderLameAlgoQuality->value()); updateLameAlgoQuality(sliderLameAlgoQuality->value());
toneAdjustTrebleChanged(spinBoxToneAdjustTreble->value()); toneAdjustTrebleChanged(spinBoxToneAdjustTreble->value());
toneAdjustBassChanged(spinBoxToneAdjustBass->value()); toneAdjustBassChanged(spinBoxToneAdjustBass->value());
customParamsChanged();
//Activate file menu actions //Activate file menu actions
connect(actionOpenFolder, SIGNAL(triggered()), this, SLOT(openFolderActionActivated())); connect(actionOpenFolder, SIGNAL(triggered()), this, SLOT(openFolderActionActivated()));
@ -1822,7 +1831,7 @@ void MainWindow::toneAdjustTrebleChanged(double value)
/* /*
* Tone adjustment has been reset * Tone adjustment has been reset
*/ */
void MainWindow::toneAdjustTrebleReset() void MainWindow::toneAdjustTrebleReset(void)
{ {
spinBoxToneAdjustBass->setValue(m_settings->toneAdjustBassDefault()); spinBoxToneAdjustBass->setValue(m_settings->toneAdjustBassDefault());
spinBoxToneAdjustTreble->setValue(m_settings->toneAdjustTrebleDefault()); spinBoxToneAdjustTreble->setValue(m_settings->toneAdjustTrebleDefault());
@ -1830,10 +1839,36 @@ void MainWindow::toneAdjustTrebleReset()
toneAdjustTrebleChanged(spinBoxToneAdjustTreble->value()); toneAdjustTrebleChanged(spinBoxToneAdjustTreble->value());
} }
/*
* Custom encoder parameters changed
*/
void MainWindow::customParamsChanged(void)
{
lineEditCustomParamLAME->setText(lineEditCustomParamLAME->text().simplified());
lineEditCustomParamOggEnc->setText(lineEditCustomParamOggEnc->text().simplified());
lineEditCustomParamNeroAAC->setText(lineEditCustomParamNeroAAC->text().simplified());
lineEditCustomParamFLAC->setText(lineEditCustomParamFLAC->text().simplified());
bool customParamsUsed = false;
if(!lineEditCustomParamLAME->text().isEmpty()) customParamsUsed = true;
if(!lineEditCustomParamOggEnc->text().isEmpty()) customParamsUsed = true;
if(!lineEditCustomParamNeroAAC->text().isEmpty()) customParamsUsed = true;
if(!lineEditCustomParamFLAC->text().isEmpty()) customParamsUsed = true;
labelCustomParamsIcon->setVisible(customParamsUsed);
labelCustomParamsText->setVisible(customParamsUsed);
labelCustomParamsSpacer->setVisible(customParamsUsed);
m_settings->customParametersLAME(lineEditCustomParamLAME->text());
m_settings->customParametersOggEnc(lineEditCustomParamOggEnc->text());
m_settings->customParametersNeroAAC(lineEditCustomParamNeroAAC->text());
m_settings->customParametersFLAC(lineEditCustomParamFLAC->text());
}
/* /*
* Reset all advanced options to their defaults * Reset all advanced options to their defaults
*/ */
void MainWindow::resetAdvancedOptionsButtonClicked() void MainWindow::resetAdvancedOptionsButtonClicked(void)
{ {
sliderLameAlgoQuality->setValue(m_settings->lameAlgoQualityDefault()); sliderLameAlgoQuality->setValue(m_settings->lameAlgoQualityDefault());
spinBoxBitrateManagementMin->setValue(m_settings->bitrateManagementMinRateDefault()); spinBoxBitrateManagementMin->setValue(m_settings->bitrateManagementMinRateDefault());
@ -1847,6 +1882,11 @@ void MainWindow::resetAdvancedOptionsButtonClicked()
while(checkBoxBitrateManagement->isChecked() != m_settings->bitrateManagementEnabledDefault()) checkBoxBitrateManagement->click(); while(checkBoxBitrateManagement->isChecked() != m_settings->bitrateManagementEnabledDefault()) checkBoxBitrateManagement->click();
while(checkBoxNeroAAC2PassMode->isChecked() != m_settings->neroAACEnable2PassDefault()) checkBoxNeroAAC2PassMode->click(); while(checkBoxNeroAAC2PassMode->isChecked() != m_settings->neroAACEnable2PassDefault()) checkBoxNeroAAC2PassMode->click();
while(checkBoxNormalizationFilter->isChecked() != m_settings->normalizationFilterEnabledDefault()) checkBoxNormalizationFilter->click(); while(checkBoxNormalizationFilter->isChecked() != m_settings->normalizationFilterEnabledDefault()) checkBoxNormalizationFilter->click();
lineEditCustomParamLAME->setText(m_settings->customParametersLAMEDefault());
lineEditCustomParamOggEnc->setText(m_settings->customParametersOggEncDefault());
lineEditCustomParamNeroAAC->setText(m_settings->customParametersNeroAACDefault());
lineEditCustomParamFLAC->setText(m_settings->customParametersFLACDefault());
customParamsChanged();
scrollArea->verticalScrollBar()->setValue(0); scrollArea->verticalScrollBar()->setValue(0);
} }

View File

@ -91,8 +91,9 @@ private slots:
void normalizationMaxVolumeChanged(double volume); void normalizationMaxVolumeChanged(double volume);
void toneAdjustBassChanged(double value); void toneAdjustBassChanged(double value);
void toneAdjustTrebleChanged(double value); void toneAdjustTrebleChanged(double value);
void toneAdjustTrebleReset(); void toneAdjustTrebleReset(void);
void resetAdvancedOptionsButtonClicked(); void customParamsChanged(void);
void resetAdvancedOptionsButtonClicked(void);
void sourceModelChanged(void); void sourceModelChanged(void);
void metaTagsEnabledChanged(void); void metaTagsEnabledChanged(void);
void playlistEnabledChanged(void); void playlistEnabledChanged(void);

View File

@ -464,6 +464,7 @@ void ProcessingDialog::startNextJob(void)
nativeResampling = true; nativeResampling = true;
} }
mp3Encoder->setChannelMode(m_settings->lameChannelMode()); mp3Encoder->setChannelMode(m_settings->lameChannelMode());
mp3Encoder->setCustomParams(m_settings->customParametersLAME());
encoder = mp3Encoder; encoder = mp3Encoder;
} }
break; break;
@ -481,6 +482,7 @@ void ProcessingDialog::startNextJob(void)
vorbisEncoder->setSamplingRate(SettingsModel::samplingRates[m_settings->samplingRate()]); vorbisEncoder->setSamplingRate(SettingsModel::samplingRates[m_settings->samplingRate()]);
nativeResampling = true; nativeResampling = true;
} }
vorbisEncoder->setCustomParams(m_settings->customParametersOggEnc());
encoder = vorbisEncoder; encoder = vorbisEncoder;
} }
break; break;
@ -491,6 +493,7 @@ void ProcessingDialog::startNextJob(void)
aacEncoder->setRCMode(m_settings->compressionRCMode()); aacEncoder->setRCMode(m_settings->compressionRCMode());
aacEncoder->setEnable2Pass(m_settings->neroAACEnable2Pass()); aacEncoder->setEnable2Pass(m_settings->neroAACEnable2Pass());
aacEncoder->setProfile(m_settings->neroAACProfile()); aacEncoder->setProfile(m_settings->neroAACProfile());
aacEncoder->setCustomParams(m_settings->customParametersNeroAAC());
encoder = aacEncoder; encoder = aacEncoder;
} }
break; break;
@ -499,6 +502,7 @@ void ProcessingDialog::startNextJob(void)
FLACEncoder *flacEncoder = new FLACEncoder(); FLACEncoder *flacEncoder = new FLACEncoder();
flacEncoder->setBitrate(m_settings->compressionBitrate()); flacEncoder->setBitrate(m_settings->compressionBitrate());
flacEncoder->setRCMode(m_settings->compressionRCMode()); flacEncoder->setRCMode(m_settings->compressionRCMode());
flacEncoder->setCustomParams(m_settings->customParametersFLAC());
encoder = flacEncoder; encoder = flacEncoder;
} }
break; break;

View File

@ -89,6 +89,8 @@ bool AACEncoder::encode(const QString &sourceFile, const AudioFileModel &metaInf
break; break;
} }
if(!m_configCustomParams.isEmpty()) args << m_configCustomParams.split(" ", QString::SkipEmptyParts);
args << "-if" << QDir::toNativeSeparators(sourceFile); args << "-if" << QDir::toNativeSeparators(sourceFile);
args << "-of" << QDir::toNativeSeparators(outputFile); args << "-of" << QDir::toNativeSeparators(outputFile);

View File

@ -27,6 +27,7 @@ AbstractEncoder::AbstractEncoder(void)
{ {
m_configBitrate = 0; m_configBitrate = 0;
m_configRCMode = 0; m_configRCMode = 0;
m_configCustomParams.clear();
} }
AbstractEncoder::~AbstractEncoder(void) AbstractEncoder::~AbstractEncoder(void)
@ -39,6 +40,7 @@ AbstractEncoder::~AbstractEncoder(void)
void AbstractEncoder::setBitrate(int bitrate) { m_configBitrate = max(0, bitrate); } void AbstractEncoder::setBitrate(int bitrate) { m_configBitrate = max(0, bitrate); }
void AbstractEncoder::setRCMode(int mode) { m_configRCMode = max(0, mode); } void AbstractEncoder::setRCMode(int mode) { m_configRCMode = max(0, mode); }
void AbstractEncoder::setCustomParams(const QString &customParams) { m_configCustomParams = customParams; }
/* /*
* Default implementation * Default implementation

View File

@ -45,8 +45,10 @@ public:
//Common setter methods //Common setter methods
void setBitrate(int bitrate); void setBitrate(int bitrate);
void setRCMode(int mode); void setRCMode(int mode);
void setCustomParams(const QString &customParams);
protected: protected:
int m_configBitrate; int m_configBitrate;
int m_configRCMode; int m_configRCMode;
QString m_configCustomParams;
}; };

View File

@ -62,6 +62,8 @@ bool FLACEncoder::encode(const QString &sourceFile, const AudioFileModel &metaIn
//args << "--tv" << QString().sprintf("Encoder=LameXP v%d.%02d.%04d [%s]", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), lamexp_version_release()); //args << "--tv" << QString().sprintf("Encoder=LameXP v%d.%02d.%04d [%s]", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), lamexp_version_release());
if(!m_configCustomParams.isEmpty()) args << m_configCustomParams.split(" ", QString::SkipEmptyParts);
args << "-f" << "-o" << QDir::toNativeSeparators(outputFile); args << "-f" << "-o" << QDir::toNativeSeparators(outputFile);
args << QDir::toNativeSeparators(sourceFile); args << QDir::toNativeSeparators(sourceFile);

View File

@ -120,6 +120,8 @@ bool MP3Encoder::encode(const QString &sourceFile, const AudioFileModel &metaInf
//args << "--tv" << QString().sprintf("Encoder=LameXP v%d.%02d.%04d [%s]", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), lamexp_version_release()); //args << "--tv" << QString().sprintf("Encoder=LameXP v%d.%02d.%04d [%s]", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), lamexp_version_release());
if(!m_configCustomParams.isEmpty()) args << m_configCustomParams.split(" ", QString::SkipEmptyParts);
args << QDir::toNativeSeparators(sourceFile); args << QDir::toNativeSeparators(sourceFile);
args << QDir::toNativeSeparators(outputFile); args << QDir::toNativeSeparators(outputFile);

View File

@ -93,6 +93,8 @@ bool VorbisEncoder::encode(const QString &sourceFile, const AudioFileModel &meta
//args << "--tv" << QString().sprintf("Encoder=LameXP v%d.%02d.%04d [%s]", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), lamexp_version_release()); //args << "--tv" << QString().sprintf("Encoder=LameXP v%d.%02d.%04d [%s]", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), lamexp_version_release());
if(!m_configCustomParams.isEmpty()) args << m_configCustomParams.split(" ", QString::SkipEmptyParts);
args << "-o" << QDir::toNativeSeparators(outputFile); args << "-o" << QDir::toNativeSeparators(outputFile);
args << QDir::toNativeSeparators(sourceFile); args << QDir::toNativeSeparators(sourceFile);

View File

@ -64,6 +64,10 @@ static const char *g_settingsId_normalizationFilterEnabled = "AdvancedOptions/Vo
static const char *g_settingsId_normalizationFilterMaxVolume = "AdvancedOptions/VolumeNormalization/MaxVolume"; static const char *g_settingsId_normalizationFilterMaxVolume = "AdvancedOptions/VolumeNormalization/MaxVolume";
static const char *g_settingsId_toneAdjustBass = "AdvancedOptions/ToneAdjustment/Bass"; static const char *g_settingsId_toneAdjustBass = "AdvancedOptions/ToneAdjustment/Bass";
static const char *g_settingsId_toneAdjustTreble = "AdvancedOptions/ToneAdjustment/Treble"; static const char *g_settingsId_toneAdjustTreble = "AdvancedOptions/ToneAdjustment/Treble";
static const char *g_settingsId_customParametersLAME = "AdvancedOptions/CustomParameters/LAME";
static const char *g_settingsId_customParametersOggEnc = "AdvancedOptions/CustomParameters/OggEnc";
static const char *g_settingsId_customParametersNeroAAC = "AdvancedOptions/CustomParameters/NeroAAC";
static const char *g_settingsId_customParametersFLAC = "AdvancedOptions/CustomParameters/FLAC";
//Macros //Macros
#define MAKE_OPTION1(OPT,DEF) \ #define MAKE_OPTION1(OPT,DEF) \
@ -233,3 +237,7 @@ MAKE_OPTION3(normalizationFilterEnabled, false)
MAKE_OPTION1(normalizationFilterMaxVolume, -50) MAKE_OPTION1(normalizationFilterMaxVolume, -50)
MAKE_OPTION1(toneAdjustBass, 0) MAKE_OPTION1(toneAdjustBass, 0)
MAKE_OPTION1(toneAdjustTreble, 0) MAKE_OPTION1(toneAdjustTreble, 0)
MAKE_OPTION2(customParametersLAME, QString());
MAKE_OPTION2(customParametersOggEnc, QString());
MAKE_OPTION2(customParametersNeroAAC, QString());
MAKE_OPTION2(customParametersFLAC, QString());

View File

@ -96,6 +96,10 @@ public:
MAKE_OPTION_DEC1(normalizationFilterMaxVolume); MAKE_OPTION_DEC1(normalizationFilterMaxVolume);
MAKE_OPTION_DEC1(toneAdjustBass); MAKE_OPTION_DEC1(toneAdjustBass);
MAKE_OPTION_DEC1(toneAdjustTreble); MAKE_OPTION_DEC1(toneAdjustTreble);
MAKE_OPTION_DEC2(customParametersLAME);
MAKE_OPTION_DEC2(customParametersOggEnc);
MAKE_OPTION_DEC2(customParametersNeroAAC);
MAKE_OPTION_DEC2(customParametersFLAC);
//Misc //Misc
void validate(void); void validate(void);