[Scummvm-cvs-logs] SF.net SVN: scummvm: [28845] scummvm/trunk/engines/agi
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Sep 3 12:25:48 CEST 2007
Revision: 28845
http://scummvm.svn.sourceforge.net/scummvm/?rev=28845&view=rev
Author: thebluegr
Date: 2007-09-03 03:25:48 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
Some more updates to Mickey's sound system
Modified Paths:
--------------
scummvm/trunk/engines/agi/preagi_mickey.cpp
scummvm/trunk/engines/agi/preagi_mickey.h
Modified: scummvm/trunk/engines/agi/preagi_mickey.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_mickey.cpp 2007-09-03 09:39:15 UTC (rev 28844)
+++ scummvm/trunk/engines/agi/preagi_mickey.cpp 2007-09-03 10:25:48 UTC (rev 28845)
@@ -34,6 +34,8 @@
#define IDA_DEFAULT 0x0F
#define IDA_DEFAULT_REV 0xF0
+#define IDI_SND_OSCILLATOR_FREQUENCY 1193180
+
namespace Agi {
int Mickey::getDat(int iRoom) {
@@ -511,16 +513,17 @@
// Sound
-#if 0
-// TODO
-void Mickey::_playNote(MSA_SND_NOTE note) {
- if (!note.counter)
- playNote(1, 0, note.length / IDI_SND_TIMER_RESOLUTION);
- else
- playNote(1, IDI_SND_OSCILLATOR_FREQUENCY / note.counter,
- note.length / IDI_SND_TIMER_RESOLUTION / IDI_SND_PITCH);
+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
+ } 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
+ }
}
-#endif
void Mickey::playSound(ENUM_MSA_SOUND iSound) {
if (!_vm->getflag(fSoundOn))
@@ -536,10 +539,7 @@
for (int iNote = 0; iNote < 6; iNote++) {
note.counter = _vm->rnd(59600) + 59;
note.length = 4;
-#if 0
- // TODO
- _PlayNote(note);
-#endif
+ playNote(note);
}
break;
default:
@@ -549,10 +549,9 @@
memcpy(¬e, buffer + pBuf, sizeof(note));
if (!note.counter && !note.length)
break;
-#if 0
- // TODO
- _PlayNote(note);
-#endif
+
+ playNote(note);
+
pBuf += 3;
if (iSound == IDI_MSA_SND_THEME) {
Modified: scummvm/trunk/engines/agi/preagi_mickey.h
===================================================================
--- scummvm/trunk/engines/agi/preagi_mickey.h 2007-09-03 09:39:15 UTC (rev 28844)
+++ scummvm/trunk/engines/agi/preagi_mickey.h 2007-09-03 10:25:48 UTC (rev 28845)
@@ -761,7 +761,7 @@
void patchMenu(MSA_MENU*);
void printDatString(int);
void printDatMessage(int);
- void _playNote(MSA_SND_NOTE);
+ void playNote(MSA_SND_NOTE);
void playSound(ENUM_MSA_SOUND);
void debug();
void drawObj(ENUM_MSA_OBJECT, int, int);
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