mirror of
https://github.com/scummvm/scummvm-tools.git
synced 2026-05-21 05:40:44 +00:00
TOOLS: Improve GUI for Ogg encoding options
This makes it possible to encode using a target quality instead of target bitrate and also makes min and max bitrates optionals. This fixes bug #3092367.
This commit is contained in:
@@ -892,6 +892,9 @@ void CompressionTool::setOggQuality(const std::string& arg) {
|
||||
|
||||
if (oggparms.quality < -1.f || oggparms.quality > 10.f)
|
||||
throw ToolException("Quality out of bounds (-q), must be between -1 and 10.");
|
||||
|
||||
// Also unset nominal bitrate so that quality is used
|
||||
oggparms.nominalBitr = -1;
|
||||
}
|
||||
|
||||
void CompressionTool::setOggMinBitrate(const std::string& arg) {
|
||||
@@ -924,6 +927,14 @@ void CompressionTool::setOggMaxBitrate(const std::string& arg) {
|
||||
throw ToolException("Maximum bitrate out of bounds (-M), must be between 8 and 160.");
|
||||
}
|
||||
|
||||
void CompressionTool::unsetOggMinBitrate() {
|
||||
oggparms.minBitr = -1;
|
||||
}
|
||||
|
||||
void CompressionTool::unsetOggMaxBitrate() {
|
||||
oggparms.maxBitr = -1;
|
||||
}
|
||||
|
||||
bool CompressionTool::processMp3Parms() {
|
||||
while (!_arguments.empty()) {
|
||||
std::string arg = _arguments.front();
|
||||
|
||||
Reference in New Issue
Block a user