mirror of
https://github.com/scummvm/scummvm-tools.git
synced 2026-05-21 05:40:44 +00:00
Fix misleading behavior with temp file extention being always .mp3 when run via GUI.
svn-id: r46438
This commit is contained in:
+16
-3
@@ -910,17 +910,14 @@ void CompressionTool::parseAudioArguments() {
|
||||
// Need workaround to be sign-correct
|
||||
switch (_format) {
|
||||
case AUDIO_MP3:
|
||||
tempEncoded = TEMP_MP3;
|
||||
if (!processMp3Parms())
|
||||
throw ToolException("Could not parse command line arguments, use --help for options");
|
||||
break;
|
||||
case AUDIO_VORBIS:
|
||||
tempEncoded = TEMP_OGG;
|
||||
if (!processOggParms())
|
||||
throw ToolException("Could not parse command line arguments, use --help for options");
|
||||
break;
|
||||
case AUDIO_FLAC:
|
||||
tempEncoded = TEMP_FLAC;
|
||||
if (!processFlacParms())
|
||||
throw ToolException("Could not parse arguments: Use --help for options");
|
||||
break;
|
||||
@@ -929,6 +926,22 @@ void CompressionTool::parseAudioArguments() {
|
||||
}
|
||||
}
|
||||
|
||||
void CompressionTool::setTempFileName() {
|
||||
switch (_format) {
|
||||
case AUDIO_MP3:
|
||||
tempEncoded = TEMP_MP3;
|
||||
break;
|
||||
case AUDIO_VORBIS:
|
||||
tempEncoded = TEMP_OGG;
|
||||
break;
|
||||
case AUDIO_FLAC:
|
||||
tempEncoded = TEMP_FLAC;
|
||||
break;
|
||||
default: // cannot occur but we check anyway to avoid compiler warnings
|
||||
throw ToolException("Unknown audio format, should be impossible!");
|
||||
}
|
||||
}
|
||||
|
||||
std::string CompressionTool::getHelp() const {
|
||||
std::ostringstream os;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user