[Scummvm-cvs-logs] SF.net SVN: scummvm:[51919] scummvm/trunk

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Aug 8 03:07:17 CEST 2010


Revision: 51919
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51919&view=rev
Author:   drmccoy
Date:     2010-08-08 01:07:17 +0000 (Sun, 08 Aug 2010)

Log Message:
-----------
VIDEO: Change the mixer parameter from a reference to a pointer

To match the other VideoDecoder classes with sound support.

Modified Paths:
--------------
    scummvm/trunk/engines/gob/videoplayer.cpp
    scummvm/trunk/graphics/video/coktel_decoder.cpp
    scummvm/trunk/graphics/video/coktel_decoder.h

Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp	2010-08-08 01:06:44 UTC (rev 51918)
+++ scummvm/trunk/engines/gob/videoplayer.cpp	2010-08-08 01:07:17 UTC (rev 51919)
@@ -714,13 +714,13 @@
 
 	Graphics::CoktelDecoder *video = 0;
 	if (properties.type == kVideoTypeIMD)
-		video = new Graphics::IMDDecoder(*_vm->_mixer, Audio::Mixer::kSFXSoundType);
+		video = new Graphics::IMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);
 	else if (properties.type == kVideoTypePreIMD)
-		video = new Graphics::PreIMDDecoder(properties.width, properties.height, *_vm->_mixer, Audio::Mixer::kSFXSoundType);
+		video = new Graphics::PreIMDDecoder(properties.width, properties.height, _vm->_mixer, Audio::Mixer::kSFXSoundType);
 	else if (properties.type == kVideoTypeVMD)
-		video = new Graphics::VMDDecoder(*_vm->_mixer, Audio::Mixer::kSFXSoundType);
+		video = new Graphics::VMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);
 	else if (properties.type == kVideoTypeRMD)
-		video = new Graphics::VMDDecoder(*_vm->_mixer, Audio::Mixer::kSFXSoundType);
+		video = new Graphics::VMDDecoder(_vm->_mixer, Audio::Mixer::kSFXSoundType);
 	else
 		warning("Couldn't open video \"%s\": Invalid video Type", fileName.c_str());
 

Modified: scummvm/trunk/graphics/video/coktel_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.cpp	2010-08-08 01:06:44 UTC (rev 51918)
+++ scummvm/trunk/graphics/video/coktel_decoder.cpp	2010-08-08 01:07:17 UTC (rev 51919)
@@ -40,12 +40,14 @@
 }
 
 
-CoktelDecoder::CoktelDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) :
-	_mixer(&mixer), _soundType(soundType), _width(0), _height(0), _x(0), _y(0),
+CoktelDecoder::CoktelDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) :
+	_mixer(mixer), _soundType(soundType), _width(0), _height(0), _x(0), _y(0),
 	_defaultX(0), _defaultY(0), _features(0), _frameCount(0), _paletteDirty(false),
 	_ownSurface(true), _frameRate(12), _hasSound(false), _soundEnabled(false),
 	_soundStage(kSoundNone), _audioStream(0) {
 
+	assert(_mixer);
+
 	memset(_palette, 0, 768);
 }
 
@@ -593,7 +595,7 @@
 
 
 PreIMDDecoder::PreIMDDecoder(uint16 width, uint16 height,
-	Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType),
+	Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType),
 	_stream(0), _videoBuffer(0), _videoBufferSize(0) {
 
 	_width  = width;
@@ -781,7 +783,7 @@
 }
 
 
-IMDDecoder::IMDDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType),
+IMDDecoder::IMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType),
 	_stream(0), _version(0), _stdX(-1), _stdY(-1), _stdWidth(-1), _stdHeight(-1),
 	_flags(0), _firstFramePos(0), _framePos(0), _frameCoords(0),
 	_frameData(0), _frameDataSize(0), _frameDataLen(0),
@@ -1470,7 +1472,7 @@
 	-1, -1, -1, -1, 2,  4,  6,  8
 };
 
-VMDDecoder::VMDDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType),
+VMDDecoder::VMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType),
 	_stream(0), _version(0), _flags(0), _frameInfoOffset(0), _partsPerFrame(0), _frames(0),
 	_soundFlags(0), _soundFreq(0), _soundSliceSize(0), _soundSlicesCount(0),
 	_soundBytesPerSample(0), _soundStereo(0), _soundHeaderSize(0), _soundDataSize(0),

Modified: scummvm/trunk/graphics/video/coktel_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.h	2010-08-08 01:06:44 UTC (rev 51918)
+++ scummvm/trunk/graphics/video/coktel_decoder.h	2010-08-08 01:07:17 UTC (rev 51919)
@@ -60,7 +60,7 @@
 		State();
 	};
 
-	CoktelDecoder(Audio::Mixer &mixer,
+	CoktelDecoder(Audio::Mixer *mixer,
 			Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType);
 	~CoktelDecoder();
 
@@ -213,7 +213,7 @@
 
 class PreIMDDecoder : public CoktelDecoder {
 public:
-	PreIMDDecoder(uint16 width, uint16 height, Audio::Mixer &mixer,
+	PreIMDDecoder(uint16 width, uint16 height, Audio::Mixer *mixer,
 			Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType);
 	~PreIMDDecoder();
 
@@ -245,7 +245,7 @@
 
 class IMDDecoder : public CoktelDecoder {
 public:
-	IMDDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType);
+	IMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType);
 	~IMDDecoder();
 
 	bool seek(int32 frame, int whence = SEEK_SET, bool restart = false);
@@ -341,7 +341,7 @@
 
 class VMDDecoder : public CoktelDecoder {
 public:
-	VMDDecoder(Audio::Mixer &mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType);
+	VMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType);
 	~VMDDecoder();
 
 	bool seek(int32 frame, int whence = SEEK_SET, bool restart = false);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list