[Scummvm-cvs-logs] scummvm master -> 866961bde9302d20f4ce6aabfead01dd8111d526

bluegr bluegr at gmail.com
Sat Jan 26 02:44:14 CET 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
866961bde9 VIDEO: Hook some more of our ADPCM decoder variants to our AVI video decoder


Commit: 866961bde9302d20f4ce6aabfead01dd8111d526
    https://github.com/scummvm/scummvm/commit/866961bde9302d20f4ce6aabfead01dd8111d526
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-25T17:43:15-08:00

Commit Message:
VIDEO: Hook some more of our ADPCM decoder variants to our AVI video decoder

Information for the AVI audio track format IDs has been taken from libav.
Thanks to clone2727 for his great help on this.

Changed paths:
    video/avi_decoder.cpp
    video/avi_decoder.h



diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 6062049..6fe9c77 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -457,6 +457,10 @@ void AVIDecoder::AVIAudioTrack::queueSound(Common::SeekableReadStream *stream) {
 				flags |= Audio::FLAG_STEREO;
 
 			_audStream->queueAudioStream(Audio::makeRawStream(stream, _wvInfo.samplesPerSec, flags, DisposeAfterUse::YES), DisposeAfterUse::YES);
+		} else if (_wvInfo.tag == kWaveFormatMSADPCM) {
+			_audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMMS, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES);
+		} else if (_wvInfo.tag == kWaveFormatMSIMAADPCM) {
+			_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);
 		}
@@ -470,7 +474,7 @@ Audio::AudioStream *AVIDecoder::AVIAudioTrack::getAudioStream() const {
 }
 
 Audio::QueuingAudioStream *AVIDecoder::AVIAudioTrack::createAudioStream() {
-	if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatDK3)
+	if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatMSADPCM || _wvInfo.tag == kWaveFormatMSIMAADPCM || _wvInfo.tag == kWaveFormatDK3)
 		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 3bdc056..34a67f4 100644
--- a/video/avi_decoder.h
+++ b/video/avi_decoder.h
@@ -203,7 +203,9 @@ private:
 		enum {
 			kWaveFormatNone = 0,
 			kWaveFormatPCM = 1,
-			kWaveFormatDK3 = 98
+			kWaveFormatMSADPCM = 2,
+			kWaveFormatMSIMAADPCM = 17,
+			kWaveFormatDK3 = 98		// rogue format number
 		};
 
 		AVIStreamHeader _audsHeader;






More information about the Scummvm-git-logs mailing list