[Scummvm-cvs-logs] CVS: scummvm/saga music.cpp,1.48,1.49 music.h,1.19,1.20 sound.cpp,1.23,1.24 sound.h,1.16,1.17

Max Horn fingolfin at users.sourceforge.net
Sat Mar 12 10:56:51 CET 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9326/saga

Modified Files:
	music.cpp music.h sound.cpp sound.h 
Log Message:
PlayingSoundHandle -> SoundHandle; also, turned the handle activity check into a mixer method

Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- music.cpp	9 Mar 2005 18:12:40 -0000	1.48
+++ music.cpp	12 Mar 2005 18:55:42 -0000	1.49
@@ -350,7 +350,7 @@
 }
 
 bool Music::isPlaying() {
-	return _musicHandle.isActive() || _player->isPlaying();
+	return _mixer->isSoundHandleActive(_musicHandle) || _player->isPlaying();
 }
 
 // The Wyrmkeep release of Inherit The Earth features external MIDI files, so
@@ -409,8 +409,7 @@
 
 	_player->stopMusic();
 
-	if (_musicHandle.isActive())
-		_mixer->stopHandle(_musicHandle);
+	_mixer->stopHandle(_musicHandle);
 
 	AudioStream *audioStream = NULL;
 	MidiParser *parser;

Index: music.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/music.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- music.h	17 Jan 2005 14:19:17 -0000	1.19
+++ music.h	12 Mar 2005 18:55:42 -0000	1.20
@@ -125,7 +125,7 @@
 	SoundMixer *_mixer;
 
 	MusicPlayer *_player;
-	PlayingSoundHandle _musicHandle;
+	SoundHandle _musicHandle;
 	uint32 _trackNumber;
 
 	static const MUSIC_MIDITABLE _midiTableITECD[26];

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sound.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- sound.cpp	9 Mar 2005 18:12:40 -0000	1.23
+++ sound.cpp	12 Mar 2005 18:55:42 -0000	1.24
@@ -152,7 +152,7 @@
 	_soundInitialized = 0;
 }
 
-int Sound::playSoundBuffer(PlayingSoundHandle *handle, SOUNDBUFFER *buf, int volume, bool loop) {
+int Sound::playSoundBuffer(SoundHandle *handle, SOUNDBUFFER *buf, int volume, bool loop) {
 	byte flags;
 
 	if (!_soundInitialized) {

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sound.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- sound.h	1 Jan 2005 16:18:36 -0000	1.16
+++ sound.h	12 Mar 2005 18:55:42 -0000	1.17
@@ -64,7 +64,7 @@
 
  private:
 
-	int playSoundBuffer(PlayingSoundHandle *handle, SOUNDBUFFER *buf, int volume, bool loop);
+	int playSoundBuffer(SoundHandle *handle, SOUNDBUFFER *buf, int volume, bool loop);
 
 	int _soundInitialized;
 	int _enabled;
@@ -72,8 +72,8 @@
 	SagaEngine *_vm;
 	SoundMixer *_mixer;
 
-	PlayingSoundHandle _effectHandle;
-	PlayingSoundHandle _voiceHandle;
+	SoundHandle _effectHandle;
+	SoundHandle _voiceHandle;
 
 };
 





More information about the Scummvm-git-logs mailing list