aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-06-08 22:54:07 +0300
committerEugene Sandulenko2014-06-08 22:54:07 +0300
commit8d70dd68ac887df8593eb139edaa8f2a084be085 (patch)
treed336fa3682b03f376d4aebfd55cb93900b936608
parent4ff543b22a19ffccfec2d176e2cb0b92b13de2e1 (diff)
downloadscummvm-rg350-8d70dd68ac887df8593eb139edaa8f2a084be085.tar.gz
scummvm-rg350-8d70dd68ac887df8593eb139edaa8f2a084be085.tar.bz2
scummvm-rg350-8d70dd68ac887df8593eb139edaa8f2a084be085.zip
AUDIO: Added stup for MP3 audiostreams in AVI
This is used in German release of Full Pipe. Unfortunately our current MP3 decoder cannot work with streamed MP3s, and bails out at the AVI header since there is no full MP3 header yet.
-rw-r--r--video/avi_decoder.cpp4
-rw-r--r--video/avi_decoder.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 68d6cb6cec..39deaea204 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -833,6 +833,8 @@ void AVIDecoder::AVIAudioTrack::queueSound(Common::SeekableReadStream *stream) {
_audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMMSIma, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES);
} else if (_wvInfo.tag == kWaveFormatDK3) {
_audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMDK3, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES);
+ } else if (_wvInfo.tag == kWaveFormatMP3) {
+ warning("AVI: MP3 audio stream is not supported");
}
} else {
delete stream;
@@ -869,7 +871,7 @@ Audio::AudioStream *AVIDecoder::AVIAudioTrack::getAudioStream() const {
}
Audio::QueuingAudioStream *AVIDecoder::AVIAudioTrack::createAudioStream() {
- if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatMSADPCM || _wvInfo.tag == kWaveFormatMSIMAADPCM || _wvInfo.tag == kWaveFormatDK3)
+ if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatMSADPCM || _wvInfo.tag == kWaveFormatMSIMAADPCM || _wvInfo.tag == kWaveFormatDK3 || _wvInfo.tag == kWaveFormatMP3)
return Audio::makeQueuingAudioStream(_wvInfo.samplesPerSec, _wvInfo.channels == 2);
else if (_wvInfo.tag != kWaveFormatNone) // No sound
warning("Unsupported AVI audio format %d", _wvInfo.tag);
diff --git a/video/avi_decoder.h b/video/avi_decoder.h
index 28d87bc3b7..4461e537c5 100644
--- a/video/avi_decoder.h
+++ b/video/avi_decoder.h
@@ -229,6 +229,7 @@ protected:
kWaveFormatPCM = 1,
kWaveFormatMSADPCM = 2,
kWaveFormatMSIMAADPCM = 17,
+ kWaveFormatMP3 = 85,
kWaveFormatDK3 = 98 // rogue format number
};