diff options
author | Filippos Karapetis | 2007-09-03 10:25:48 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-09-03 10:25:48 +0000 |
commit | 5e1a10c0707ee464339a28b3cd6e167236b7a50a (patch) | |
tree | 402a65bfba356dececdd7a9ac225ab1e06923902 /engines/agi | |
parent | 51554b6f20e68d801dff96feb95d5faa0966f8cf (diff) | |
download | scummvm-rg350-5e1a10c0707ee464339a28b3cd6e167236b7a50a.tar.gz scummvm-rg350-5e1a10c0707ee464339a28b3cd6e167236b7a50a.tar.bz2 scummvm-rg350-5e1a10c0707ee464339a28b3cd6e167236b7a50a.zip |
Some more updates to Mickey's sound system
svn-id: r28845
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/preagi_mickey.cpp | 33 | ||||
-rw-r--r-- | engines/agi/preagi_mickey.h | 2 |
2 files changed, 17 insertions, 18 deletions
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp index 844235cbfa..8d31bdb7c9 100644 --- a/engines/agi/preagi_mickey.cpp +++ b/engines/agi/preagi_mickey.cpp @@ -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 @@ void Mickey::printDatMessage(int iStr) { // 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 @@ void Mickey::playSound(ENUM_MSA_SOUND iSound) { 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 @@ void Mickey::playSound(ENUM_MSA_SOUND iSound) { 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) { diff --git a/engines/agi/preagi_mickey.h b/engines/agi/preagi_mickey.h index 376211bea3..053fe3c2f8 100644 --- a/engines/agi/preagi_mickey.h +++ b/engines/agi/preagi_mickey.h @@ -761,7 +761,7 @@ protected: 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); |