[Scummvm-cvs-logs] SF.net SVN: scummvm: [29575] scummvm/trunk/engines/agi/preagi_mickey.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Nov 20 01:26:37 CET 2007


Revision: 29575
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29575&view=rev
Author:   thebluegr
Date:     2007-11-19 16:26:36 -0800 (Mon, 19 Nov 2007)

Log Message:
-----------
Implemented music in Mickey's Space Adventure, thanks to the now common softsynth square wave generator

Modified Paths:
--------------
    scummvm/trunk/engines/agi/preagi_mickey.cpp

Modified: scummvm/trunk/engines/agi/preagi_mickey.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_mickey.cpp	2007-11-19 22:47:58 UTC (rev 29574)
+++ scummvm/trunk/engines/agi/preagi_mickey.cpp	2007-11-20 00:26:36 UTC (rev 29575)
@@ -34,6 +34,8 @@
 #include "agi/graphics.h"
 
 #define IDI_SND_OSCILLATOR_FREQUENCY	1193180
+#define IDI_SND_TIMER_RESOLUTION		0.0182
+#define IDI_SND_PITCH					1.5
 
 namespace Agi {
 
@@ -579,14 +581,11 @@
 // Sound
 
 void Mickey::playNote(MSA_SND_NOTE note) {
-	// TODO
 	if (!note.counter) {
-		//_vm->_sound->playNote(1, 0, 160);												// ScummVM
-		//playNote(1, 0, note.length / IDI_SND_TIMER_RESOLUTION);						// TrollVM
+		// Pause
+		_vm->_system->delayMillis(note.length / IDI_SND_TIMER_RESOLUTION);
 	} else {
-		//_vm->_sound->playNote(1, IDI_SND_OSCILLATOR_FREQUENCY / note.counter, 160);	// ScummVM
-		//playNote(1, IDI_SND_OSCILLATOR_FREQUENCY / note.counter,
-		//	note.length / IDI_SND_TIMER_RESOLUTION / IDI_SND_PITCH);					// TrollVM
+		_vm->playNote(IDI_SND_OSCILLATOR_FREQUENCY / note.counter, note.length / IDI_SND_TIMER_RESOLUTION / IDI_SND_PITCH);
 	}
 }
 


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