[Scummvm-cvs-logs] CVS: scummvm/bs2/driver d_sound.cpp,1.29,1.30

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Tue Sep 2 08:56:16 CEST 2003


Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv14118/driver

Modified Files:
	d_sound.cpp 
Log Message:
Moved the sound initialisation to the Sword2Sound constructor to avoid
warning messages about uninitialised sound handles.


Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/d_sound.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- d_sound.cpp	2 Sep 2003 15:11:19 -0000	1.29
+++ d_sound.cpp	2 Sep 2003 15:55:55 -0000	1.30
@@ -169,6 +169,7 @@
 #include "rdwin.h"			// for hwnd.
 #include "d_sound.h"
 #include "../sword2.h"
+#include "common/timer.h"
 #include "sound/mixer.h"
 
 // Decompression macros
@@ -235,6 +236,15 @@
 	musicMuted = 0;
 	bufferSizeMusic = 44100;
 	_mixer = mixer;
+
+	// Don't care if this fails, because it should still work without
+	// sound cards but it should set a global system flag so that we can
+	// avoid loading sound fx & streaming music because they won't be
+	// heard anyway
+
+	InitialiseSound(22050, 2, 16);
+
+	g_engine->_timer->installProcedure(sword2_sound_handler, 1000000);
 }
 
 // --------------------------------------------------------------------------





More information about the Scummvm-git-logs mailing list