OSDN Git Service

Added an option to manually specify the number of parallel instances.
authorlordmulder <mulder2@gmx.de>
Thu, 24 Feb 2011 23:22:18 +0000 (00:22 +0100)
committerlordmulder <mulder2@gmx.de>
Thu, 24 Feb 2011 23:22:18 +0000 (00:22 +0100)
16 files changed:
doc/Changelog.html
etc/Translation/Blank.ts
etc/Translation/LameXP_DE.ts
etc/Translation/LameXP_ES.ts
etc/Translation/LameXP_FR.ts
etc/Translation/LameXP_IT.ts
etc/Translation/LameXP_RU.ts
etc/Translation/LameXP_UK.ts
gui/MainWindow.ui
res/localization/LameXP_DE.qm
src/Config.h
src/Dialog_MainWindow.cpp
src/Dialog_MainWindow.h
src/Dialog_Processing.cpp
src/Model_Settings.cpp
src/Model_Settings.h

index d6b5579..9df5c04 100644 (file)
@@ -4,6 +4,7 @@
 <h3>LameXP - Version History</h3><br>
 
 Changes between v4.00 and v4.01:<br><ul>
+<li>Added an option to manually specify the number of parallel instances
 <li>Updated LAME encoder to v3.99.0.12 (2011-02-13), compiled with ICL 12.0.2
 <li>Updated Vorbis encoder to v2.87 using aoTuV Beta-6.01 (2011-02-22), compiled with ICL 11.1 and MSVC 9.0
 <li>Updated language files (big "thank you" to all contributors !!!)
index 8add503..8299ea3 100644 (file)
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <source> Multi-Threading </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Choose the number of parallel instances based on the number of CPU cores (Recommended)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Fewer Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>More Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <source>Reset Advanced Options </source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <source>%1 Instance(s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <source>Do you really want to disable the update reminder?</source>
         <translation type="unfinished"></translation>
     </message>
index f7b87cf..767b2a9 100644 (file)
         <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>
+    <message>
+        <source> Multi-Threading </source>
+        <translation></translation>
+    </message>
+    <message>
+        <source>Choose the number of parallel instances based on the number of CPU cores (Recommended)</source>
+        <translation>Anzahl der parallelen Instanzen entsprechend der Anzahl der CPU Kerne festlegen (Empfohlen)</translation>
+    </message>
+    <message>
+        <source>Fewer Instances</source>
+        <translation>Weniger Instanzen</translation>
+    </message>
+    <message>
+        <source>More Instances</source>
+        <translation>Mehr Instanzen</translation>
+    </message>
+    <message>
+        <source>%1 Instance(s)</source>
+        <translation>%1 Instanz(en)</translation>
+    </message>
 </context>
 <context>
     <name>MetaInfo</name>
index a9d1a67..78ffb6e 100644 (file)
         <source>Warning: Custom parameters won&apos;t be checked at all. Use them at your own risk !!!</source>
         <translation>Aviso: Los parámetros personalizados no se comprobarán en absoluto. ¡¡¡ Úselos bajo su propio riesgo !!!</translation>
     </message>
+    <message>
+        <source> Multi-Threading </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Choose the number of parallel instances based on the number of CPU cores (Recommended)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Fewer Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>More Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>%1 Instance(s)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>MetaInfo</name>
index a405d9f..6d3a6cd 100644 (file)
@@ -1154,6 +1154,26 @@ Sélection automatique (par défaut)</translation>
         <source>Warning: Custom parameters won&apos;t be checked at all. Use them at your own risk !!!</source>
         <translation>Avertissement : Les paramètres personnalisés ne peuvent pas être entièrement vérifiés. Vous les utilisez à votre propre risque !!!</translation>
     </message>
+    <message>
+        <source> Multi-Threading </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Choose the number of parallel instances based on the number of CPU cores (Recommended)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Fewer Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>More Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>%1 Instance(s)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>MetaInfo</name>
index b85f01e..bceed85 100644 (file)
         <source>Warning: Custom parameters won&apos;t be checked at all. Use them at your own risk !!!</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source> Multi-Threading </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Choose the number of parallel instances based on the number of CPU cores (Recommended)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Fewer Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>More Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>%1 Instance(s)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>MetaInfo</name>
index 634477e..c65d5b6 100644 (file)
         <source>The LameXP shell integration has been re-enabled.</source>
         <translation type="unfinished">Интегрирование в контекстное меню включено.</translation>
     </message>
+    <message>
+        <source> Multi-Threading </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Choose the number of parallel instances based on the number of CPU cores (Recommended)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Fewer Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>More Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>%1 Instance(s)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>MetaInfo</name>
index a341487..c9b4341 100644 (file)
         <source>Warning: Custom parameters won&apos;t be checked at all. Use them at your own risk !!!</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <source> Multi-Threading </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Choose the number of parallel instances based on the number of CPU cores (Recommended)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>Fewer Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>More Instances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <source>%1 Instance(s)</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>MetaInfo</name>
index 041030b..8e6a8cb 100644 (file)
                <x>0</x>
                <y>0</y>
                <width>604</width>
-               <height>812</height>
+               <height>965</height>
               </rect>
              </property>
              <layout class="QGridLayout" name="gridLayout_22">
                   <layout class="QGridLayout" name="gridLayout_17">
                    <item row="0" column="1">
                     <layout class="QGridLayout" name="gridLayout_16">
-                     <item row="7" column="0">
+                     <item row="1" column="0">
                       <spacer name="horizontalSpacer_12">
                        <property name="orientation">
                         <enum>Qt::Horizontal</enum>
                        </property>
                       </spacer>
                      </item>
-                     <item row="7" column="4">
+                     <item row="1" column="4">
                       <spacer name="horizontalSpacer_13">
                        <property name="orientation">
                         <enum>Qt::Horizontal</enum>
                        </property>
                       </spacer>
                      </item>
-                     <item row="8" column="1">
+                     <item row="2" column="1">
                       <widget class="QLabel" name="label">
                        <property name="text">
                         <string>Faster Processing</string>
                        </property>
                       </widget>
                      </item>
-                     <item row="8" column="2">
+                     <item row="2" column="2">
                       <widget class="QLabel" name="labelLameAlgoQuality">
                        <property name="font">
                         <font>
                        </property>
                       </widget>
                      </item>
-                     <item row="8" column="3">
+                     <item row="2" column="3">
                       <widget class="QLabel" name="label_3">
                        <property name="text">
                         <string>Better quality</string>
                        </property>
                       </widget>
                      </item>
-                     <item row="6" column="1" colspan="3">
+                     <item row="0" column="1" colspan="3">
                       <spacer name="verticalSpacer_4">
                        <property name="orientation">
                         <enum>Qt::Vertical</enum>
                        </property>
                       </spacer>
                      </item>
-                     <item row="7" column="1" colspan="3">
+                     <item row="1" column="1" colspan="3">
                       <widget class="QSlider" name="sliderLameAlgoQuality">
                        <property name="maximum">
                         <number>4</number>
                   </layout>
                  </widget>
                 </item>
+                <item row="7" column="0">
+                 <widget class="QGroupBox" name="groupBox_12">
+                  <property name="font">
+                   <font>
+                    <weight>50</weight>
+                    <bold>false</bold>
+                   </font>
+                  </property>
+                  <property name="title">
+                   <string> Multi-Threading </string>
+                  </property>
+                  <layout class="QGridLayout" name="gridLayout_32">
+                   <item row="0" column="0">
+                    <layout class="QGridLayout" name="gridLayout_31">
+                     <item row="1" column="1" colspan="3">
+                      <widget class="QSlider" name="sliderMaxInstances">
+                       <property name="minimum">
+                        <number>1</number>
+                       </property>
+                       <property name="maximum">
+                        <number>16</number>
+                       </property>
+                       <property name="pageStep">
+                        <number>1</number>
+                       </property>
+                       <property name="sliderPosition">
+                        <number>4</number>
+                       </property>
+                       <property name="orientation">
+                        <enum>Qt::Horizontal</enum>
+                       </property>
+                       <property name="tickPosition">
+                        <enum>QSlider::TicksBelow</enum>
+                       </property>
+                       <property name="tickInterval">
+                        <number>1</number>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="0">
+                      <spacer name="horizontalSpacer_35">
+                       <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="4">
+                      <spacer name="horizontalSpacer_36">
+                       <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="3">
+                      <spacer name="verticalSpacer_17">
+                       <property name="orientation">
+                        <enum>Qt::Vertical</enum>
+                       </property>
+                       <property name="sizeType">
+                        <enum>QSizePolicy::Fixed</enum>
+                       </property>
+                       <property name="sizeHint" stdset="0">
+                        <size>
+                         <width>8</width>
+                         <height>8</height>
+                        </size>
+                       </property>
+                      </spacer>
+                     </item>
+                     <item row="5" column="1" colspan="3">
+                      <spacer name="verticalSpacer_18">
+                       <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="4" column="1" colspan="3">
+                      <widget class="QCheckBox" name="checkBoxAutoDetectInstances">
+                       <property name="text">
+                        <string>Choose the number of parallel instances based on the number of CPU cores (Recommended)</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="2" column="1">
+                      <widget class="QLabel" name="labelMaxInstancesFewer">
+                       <property name="text">
+                        <string>Fewer Instances</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="2" column="2">
+                      <widget class="QLabel" name="labelMaxInstances">
+                       <property name="font">
+                        <font>
+                         <weight>75</weight>
+                         <bold>true</bold>
+                        </font>
+                       </property>
+                       <property name="text">
+                        <string notr="true">(VALUE)</string>
+                       </property>
+                       <property name="alignment">
+                        <set>Qt::AlignCenter</set>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="2" column="3">
+                      <widget class="QLabel" name="labelMaxInstancesMore">
+                       <property name="text">
+                        <string>More Instances</string>
+                       </property>
+                       <property name="alignment">
+                        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="3" column="1" colspan="3">
+                      <spacer name="verticalSpacer_19">
+                       <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>12</height>
+                        </size>
+                       </property>
+                      </spacer>
+                     </item>
+                    </layout>
+                   </item>
+                  </layout>
+                 </widget>
+                </item>
                </layout>
               </item>
               <item row="6" column="0">
   <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>
  <connections>
   <connection>
      <y>-1</y>
     </hint>
     <hint type="destinationlabel">
-     <x>67</x>
-     <y>460</y>
+     <x>81</x>
+     <y>382</y>
     </hint>
    </hints>
   </connection>
      <y>253</y>
     </hint>
     <hint type="destinationlabel">
-     <x>587</x>
-     <y>460</y>
+     <x>641</x>
+     <y>382</y>
     </hint>
    </hints>
   </connection>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>327</x>
-     <y>465</y>
+     <x>341</x>
+     <y>380</y>
     </hint>
     <hint type="destinationlabel">
      <x>327</x>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>327</x>
-     <y>465</y>
+     <x>341</x>
+     <y>380</y>
     </hint>
     <hint type="destinationlabel">
      <x>327</x>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>344</x>
-     <y>465</y>
+     <x>358</x>
+     <y>380</y>
     </hint>
     <hint type="destinationlabel">
-     <x>215</x>
-     <y>430</y>
+     <x>408</x>
+     <y>346</y>
     </hint>
    </hints>
   </connection>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>344</x>
-     <y>465</y>
+     <x>358</x>
+     <y>380</y>
     </hint>
     <hint type="destinationlabel">
-     <x>84</x>
-     <y>430</y>
+     <x>98</x>
+     <y>346</y>
     </hint>
    </hints>
   </connection>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>344</x>
-     <y>465</y>
+     <x>358</x>
+     <y>380</y>
     </hint>
     <hint type="destinationlabel">
-     <x>603</x>
-     <y>430</y>
+     <x>641</x>
+     <y>346</y>
     </hint>
    </hints>
   </connection>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>344</x>
-     <y>465</y>
+     <x>358</x>
+     <y>380</y>
     </hint>
     <hint type="destinationlabel">
-     <x>214</x>
-     <y>430</y>
+     <x>276</x>
+     <y>346</y>
     </hint>
    </hints>
   </connection>
      <y>-1</y>
     </hint>
     <hint type="destinationlabel">
-     <x>255</x>
-     <y>460</y>
+     <x>300</x>
+     <y>382</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>177</x>
-     <y>285</y>
+     <x>201</x>
+     <y>372</y>
     </hint>
     <hint type="destinationlabel">
      <x>336</x>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>183</x>
-     <y>465</y>
+     <x>207</x>
+     <y>372</y>
     </hint>
     <hint type="destinationlabel">
-     <x>596</x>
-     <y>404</y>
+     <x>632</x>
+     <y>315</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>183</x>
-     <y>465</y>
+     <x>207</x>
+     <y>372</y>
     </hint>
     <hint type="destinationlabel">
-     <x>299</x>
-     <y>404</y>
+     <x>344</x>
+     <y>315</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>183</x>
-     <y>465</y>
+     <x>207</x>
+     <y>372</y>
     </hint>
     <hint type="destinationlabel">
-     <x>39</x>
-     <y>404</y>
+     <x>47</x>
+     <y>315</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>183</x>
-     <y>465</y>
+     <x>207</x>
+     <y>372</y>
     </hint>
     <hint type="destinationlabel">
-     <x>500</x>
-     <y>404</y>
+     <x>536</x>
+     <y>315</y>
     </hint>
    </hints>
   </connection>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>70</x>
-     <y>79</y>
+     <x>84</x>
+     <y>380</y>
     </hint>
     <hint type="destinationlabel">
-     <x>70</x>
-     <y>79</y>
+     <x>397</x>
+     <y>372</y>
     </hint>
    </hints>
   </connection>
    <slot>click()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>70</x>
-     <y>79</y>
+     <x>93</x>
+     <y>159</y>
     </hint>
     <hint type="destinationlabel">
-     <x>65</x>
-     <y>79</y>
+     <x>599</x>
+     <y>315</y>
     </hint>
    </hints>
   </connection>
    <slot>setDisabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>70</x>
-     <y>79</y>
+     <x>84</x>
+     <y>380</y>
     </hint>
     <hint type="destinationlabel">
-     <x>70</x>
-     <y>79</y>
+     <x>459</x>
+     <y>380</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>123</x>
-     <y>214</y>
+     <x>163</x>
+     <y>231</y>
     </hint>
     <hint type="destinationlabel">
      <x>256</x>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>123</x>
-     <y>214</y>
+     <x>163</x>
+     <y>231</y>
     </hint>
     <hint type="destinationlabel">
      <x>465</x>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>123</x>
-     <y>214</y>
+     <x>163</x>
+     <y>231</y>
     </hint>
     <hint type="destinationlabel">
      <x>360</x>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>123</x>
-     <y>214</y>
+     <x>163</x>
+     <y>231</y>
     </hint>
     <hint type="destinationlabel">
      <x>569</x>
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>checkBoxAutoDetectInstances</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>sliderMaxInstances</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>363</x>
+     <y>953</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>363</x>
+     <y>897</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>checkBoxAutoDetectInstances</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>labelMaxInstances</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>363</x>
+     <y>953</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>409</x>
+     <y>916</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>checkBoxAutoDetectInstances</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>labelMaxInstancesFewer</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>363</x>
+     <y>953</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>185</x>
+     <y>916</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>checkBoxAutoDetectInstances</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>labelMaxInstancesMore</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>363</x>
+     <y>953</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>588</x>
+     <y>916</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
 </ui>
index a11f6ae..167a10c 100644 (file)
Binary files a/res/localization/LameXP_DE.qm and b/res/localization/LameXP_DE.qm differ
index 05c23b3..26988fd 100644 (file)
@@ -25,7 +25,7 @@
 #define VER_LAMEXP_MAJOR                               4
 #define VER_LAMEXP_MINOR_HI                            0
 #define VER_LAMEXP_MINOR_LO                            1
-#define VER_LAMEXP_BUILD                               332
+#define VER_LAMEXP_BUILD                               334
 #define VER_LAMEXP_SUFFIX                              Beta-1
 
 /*
index 260b230..aa4a865 100644 (file)
@@ -207,6 +207,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
 
        //Setup "Advanced Options" tab
        sliderLameAlgoQuality->setValue(m_settings->lameAlgoQuality());
+       if(m_settings->maximumInstances() > 0) sliderMaxInstances->setValue(m_settings->maximumInstances());
        spinBoxBitrateManagementMin->setValue(m_settings->bitrateManagementMinRate());
        spinBoxBitrateManagementMax->setValue(m_settings->bitrateManagementMaxRate());
        spinBoxNormalizationFilter->setValue(static_cast<double>(m_settings->normalizationFilterMaxVolume()) / 100.0);
@@ -218,6 +219,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        while(checkBoxBitrateManagement->isChecked() != m_settings->bitrateManagementEnabled()) checkBoxBitrateManagement->click();
        while(checkBoxNeroAAC2PassMode->isChecked() != m_settings->neroAACEnable2Pass()) checkBoxNeroAAC2PassMode->click();
        while(checkBoxNormalizationFilter->isChecked() != m_settings->normalizationFilterEnabled()) checkBoxNormalizationFilter->click();
+       while(checkBoxAutoDetectInstances->isChecked() != (m_settings->maximumInstances() < 1)) checkBoxAutoDetectInstances->click();
        lineEditCustomParamLAME->setText(m_settings->customParametersLAME());
        lineEditCustomParamOggEnc->setText(m_settings->customParametersOggEnc());
        lineEditCustomParamNeroAAC->setText(m_settings->customParametersNeroAAC());
@@ -239,8 +241,11 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
        connect(lineEditCustomParamOggEnc, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
        connect(lineEditCustomParamNeroAAC, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
        connect(lineEditCustomParamFLAC, SIGNAL(editingFinished()), this, SLOT(customParamsChanged()));
+       connect(sliderMaxInstances, SIGNAL(valueChanged(int)), this, SLOT(updateMaximumInstances(int)));
+       connect(checkBoxAutoDetectInstances, SIGNAL(clicked(bool)), this, SLOT(autoDetectInstancesChanged(bool)));
        connect(buttonResetAdvancedOptions, SIGNAL(clicked()), this, SLOT(resetAdvancedOptionsButtonClicked()));
        updateLameAlgoQuality(sliderLameAlgoQuality->value());
+       updateMaximumInstances(sliderMaxInstances->value());
        toneAdjustTrebleChanged(spinBoxToneAdjustTreble->value());
        toneAdjustBassChanged(spinBoxToneAdjustBass->value());
        customParamsChanged();
@@ -607,6 +612,7 @@ void MainWindow::changeEvent(QEvent *e)
                m_metaInfoModel->setData(m_metaInfoModel->index(4, 1), m_settings->metaInfoPosition());
                updateEncoder(m_settings->compressionEncoder());
                updateLameAlgoQuality(sliderLameAlgoQuality->value());
+               updateMaximumInstances(sliderMaxInstances->value());
 
                //Re-install shell integration
                if(m_settings->shellIntegrationEnabled())
@@ -1925,6 +1931,23 @@ void MainWindow::customParamsChanged(void)
 }
 
 /*
+ * Maximum number of instances changed
+ */
+void MainWindow::updateMaximumInstances(int value)
+{
+       labelMaxInstances->setText(tr("%1 Instance(s)").arg(QString::number(value)));
+       m_settings->maximumInstances(checkBoxAutoDetectInstances->isChecked() ? NULL : value);
+}
+
+/*
+ * Auto-detect number of instances
+ */
+void MainWindow::autoDetectInstancesChanged(bool checked)
+{
+       m_settings->maximumInstances(checked ? NULL : sliderMaxInstances->value());
+}
+
+/*
  * Reset all advanced options to their defaults
  */
 void MainWindow::resetAdvancedOptionsButtonClicked(void)
@@ -1941,6 +1964,7 @@ void MainWindow::resetAdvancedOptionsButtonClicked(void)
        while(checkBoxBitrateManagement->isChecked() != m_settings->bitrateManagementEnabledDefault()) checkBoxBitrateManagement->click();
        while(checkBoxNeroAAC2PassMode->isChecked() != m_settings->neroAACEnable2PassDefault()) checkBoxNeroAAC2PassMode->click();
        while(checkBoxNormalizationFilter->isChecked() != m_settings->normalizationFilterEnabledDefault()) checkBoxNormalizationFilter->click();
+       while(checkBoxAutoDetectInstances->isChecked() != (m_settings->maximumInstancesDefault() < 1)) checkBoxAutoDetectInstances->click();
        lineEditCustomParamLAME->setText(m_settings->customParametersLAMEDefault());
        lineEditCustomParamOggEnc->setText(m_settings->customParametersOggEncDefault());
        lineEditCustomParamNeroAAC->setText(m_settings->customParametersNeroAACDefault());
index 090c521..f1693ad 100644 (file)
@@ -93,6 +93,8 @@ private slots:
        void toneAdjustTrebleChanged(double value);
        void toneAdjustTrebleReset(void);
        void customParamsChanged(void);
+       void updateMaximumInstances(int value);
+       void autoDetectInstancesChanged(bool checked);
        void resetAdvancedOptionsButtonClicked(void);
        void sourceModelChanged(void);
        void metaTagsEnabledChanged(void);
index 6723bc9..228edab 100644 (file)
@@ -267,9 +267,14 @@ void ProcessingDialog::initEncoding(void)
        WinSevenTaskbar::setTaskbarProgress(this, 0, m_pendingJobs.count());
        WinSevenTaskbar::setOverlayIcon(this, &QIcon(":/icons/control_play_blue.png"));
 
-       lamexp_cpu_t cpuFeatures = lamexp_detect_cpu_features();
-       int parallelThreadCount = max(min(min(cpuFeatures.count, m_pendingJobs.count()), 4), 1);
+       int maximumInstances = max(min(m_settings->maximumInstances(), 16), 0);
+       if(maximumInstances < 1)
+       {
+               lamexp_cpu_t cpuFeatures = lamexp_detect_cpu_features();
+               maximumInstances = max(min(cpuFeatures.count, 4), 1);
+       }
 
+       int parallelThreadCount = max(min(maximumInstances, m_pendingJobs.count()), 1);
        if(parallelThreadCount > 1)
        {
                m_progressModel->addSystemMessage(tr("Multi-threading enabled: Running %1 instances in parallel!").arg(QString::number(parallelThreadCount)));
index 46962aa..f6b9179 100644 (file)
@@ -100,6 +100,7 @@ MAKE_ID(customParametersOggEnc, "AdvancedOptions/CustomParameters/OggEnc");
 MAKE_ID(customParametersNeroAAC, "AdvancedOptions/CustomParameters/NeroAAC");
 MAKE_ID(customParametersFLAC, "AdvancedOptions/CustomParameters/FLAC");
 MAKE_ID(metaInfoPosition, "MetaInformation/PlaylistPosition");
+MAKE_ID(maximumInstances, "AdvancedOptions/Threading/MaximumInstances");
 
 //LUT
 const int SettingsModel::mp3Bitrates[15] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1};
@@ -258,3 +259,4 @@ MAKE_OPTION2(customParametersOggEnc, QString());
 MAKE_OPTION2(customParametersNeroAAC, QString());
 MAKE_OPTION2(customParametersFLAC, QString());
 MAKE_OPTION4(metaInfoPosition, UINT_MAX);
+MAKE_OPTION4(maximumInstances, 0);
index 7c4b5c9..032a92f 100644 (file)
@@ -110,6 +110,7 @@ public:
        MAKE_OPTION_DEC2(customParametersNeroAAC);
        MAKE_OPTION_DEC2(customParametersFLAC);
        MAKE_OPTION_DEC4(metaInfoPosition);
+       MAKE_OPTION_DEC4(maximumInstances);
 
        //Misc
        void validate(void);