Add the option to enable variable bit rates to the export dialog

If the variables bit rate is not enabled the nominal bit rate will be
used for the minimum and maximum bit rate in the encoder.

If the variable bit rate is enabled the current implementation will
compute the minimum bitrate by subtracting 64 kBit/s from the nominal
bit rate. The maximum bit rate is computed by adding 64 kBit/s to it.

Example: The nominal bit rate is set to 160 kBit/s and variable bit rate
is enabled in the export dialog. The minimum bit rate is then set to 96
kBit/s and the maximum bit rate to 224 kBit/s.
This commit is contained in:
Michael Gregorius
2017-04-29 16:14:33 +02:00
parent 3a14d3b434
commit 0ba4df406c
2 changed files with 10 additions and 1 deletions

View File

@@ -140,7 +140,9 @@ void ExportProjectDialog::startExport()
const int samplerates[5] = { 44100, 48000, 88200, 96000, 192000 };
const bitrate_t bitrates[6] = { 64, 128, 160, 192, 256, 320 };
OutputSettings::BitRateSettings bitRateSettings(bitrates[ bitrateCB->currentIndex() ], false);
bool useVariableBitRate = checkBoxVariableBitRate->isChecked();
OutputSettings::BitRateSettings bitRateSettings(bitrates[ bitrateCB->currentIndex() ], useVariableBitRate);
OutputSettings os = OutputSettings(
samplerates[ samplerateCB->currentIndex() ],
bitRateSettings,

View File

@@ -174,6 +174,13 @@
</item>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxVariableBitRate">
<property name="text">
<string>Use variable bitrate</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>