[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_mixer.cpp,1.12,1.13 smush_player.cpp,1.39,1.40

Max Horn fingolfin at users.sourceforge.net
Sun Jun 22 04:48:01 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv23571/smush

Modified Files:
	smush_mixer.cpp smush_player.cpp 
Log Message:
Change names of the stream API in the mixer; added endStream method (stop() halts stream immediately; endStream() lets it first finish playing)

Index: smush_mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_mixer.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- smush_mixer.cpp	22 Jun 2003 06:27:32 -0000	1.12
+++ smush_mixer.cpp	22 Jun 2003 11:47:03 -0000	1.13
@@ -109,6 +109,8 @@
 				delete _channels[i].chan;
 				_channels[i].id = -1;
 				_channels[i].chan = NULL;
+				if (_channels[i].mixer_index != -1)
+					_mixer->endStream(_channels[i].mixer_index);
 			} else {
 				int32 rate;
 				bool stereo, is_short;
@@ -135,9 +137,9 @@
 
 				if (_silentMixer == false) {
 					if (_channels[i].mixer_index == -1) {
-						_channels[i].mixer_index = _mixer->playStream(data, size, rate, flags, 2000000);
+						_channels[i].mixer_index = _mixer->newStream(data, size, rate, flags, 2000000);
 					} else {
-						_mixer->append(_channels[i].mixer_index, data, size);
+						_mixer->appendStream(_channels[i].mixer_index, data, size);
 					}
 				}
 				free(data);

Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- smush_player.cpp	21 Jun 2003 23:29:34 -0000	1.39
+++ smush_player.cpp	22 Jun 2003 11:47:03 -0000	1.40
@@ -223,7 +223,7 @@
 	_storeFrame = false;
 	_width = 0;
 	_height = 0;
-	_IACTchannel = -1,
+	_IACTchannel = -1;
 	_IACTpos = 0;
 	_soundFrequency = 22050;
 	_speed = speed;
@@ -283,6 +283,11 @@
 		delete _base;
 		_base = NULL;
 	}
+	
+	if (_IACTchannel != -1) {
+		_scumm->_mixer->stop(_IACTchannel);
+		_IACTchannel = -1;
+	}
 
 	_scumm->_insaneState = false;
 	_scumm->abortCutscene();
@@ -451,10 +456,10 @@
 					} while (--count);
 
 					if (_IACTchannel == -1) {
-						_IACTchannel = _scumm->_mixer->playStream(output_data, 0x1000, 22050,
+						_IACTchannel = _scumm->_mixer->newStream(output_data, 0x1000, 22050,
 															SoundMixer::FLAG_STEREO | SoundMixer::FLAG_16BITS, 200000);
 					} else {
-						_scumm->_mixer->append(_IACTchannel, output_data, 0x1000);
+						_scumm->_mixer->appendStream(_IACTchannel, output_data, 0x1000);
 					}
 
 					bsize -= len;





More information about the Scummvm-git-logs mailing list