|
|
| version 1.4, 2003/11/14 07:37:29 | version 1.5, 2003/11/21 06:51:11 |
|---|---|
| Line 6 | Line 6 |
| #include "soundmng.h" | #include "soundmng.h" |
| #include "sound.h" | #include "sound.h" |
| #if defined(VERMOUTH_LIB) | #if defined(VERMOUTH_LIB) |
| #include "vermouth.h" | #include "commng.h" |
| #include "cmver.h" | |
| #endif | #endif |
| Line 32 static BOOL QS_Avail = FALSE; | Line 33 static BOOL QS_Avail = FALSE; |
| static _QSOUND QSound; | static _QSOUND QSound; |
| static BOOL QSound_Playing = FALSE; | static BOOL QSound_Playing = FALSE; |
| #if defined(VERMOUTH_LIB) | |
| MIDIMOD vermouth_module = NULL; | |
| #endif | |
| static pascal void QSoundCallback(SndChannelPtr inCh, SndCommand *inCmd) { | static pascal void QSoundCallback(SndChannelPtr inCh, SndCommand *inCmd) { |
| Line 195 static void SoundBuffer_Term(void) { | Line 192 static void SoundBuffer_Term(void) { |
| UINT soundmng_create(UINT rate, UINT ms) { | UINT soundmng_create(UINT rate, UINT ms) { |
| UINT samples; | UINT samples; |
| #if defined(VERMOUTH_LIB) | |
| UINT num; | |
| #endif | |
| QSound_Playing = FALSE; | QSound_Playing = FALSE; |
| Line 222 UINT soundmng_create(UINT rate, UINT ms) | Line 216 UINT soundmng_create(UINT rate, UINT ms) |
| goto qsinit_err; | goto qsinit_err; |
| } | } |
| #if defined(VERMOUTH_LIB) | #if defined(VERMOUTH_LIB) |
| vermouth_module = midimod_create(rate); | cmvermouth_load(rate); |
| for (num=0; num<128; num++) { | |
| midimod_loadprogram(vermouth_module, num); | |
| midimod_loadrhythm(vermouth_module, num); | |
| } | |
| #endif | #endif |
| return(samples); | return(samples); |
| Line 242 void soundmng_destroy(void) { | Line 232 void soundmng_destroy(void) { |
| SoundBuffer_Term(); | SoundBuffer_Term(); |
| SoundChannel_Term(); | SoundChannel_Term(); |
| #if defined(VERMOUTH_LIB) | #if defined(VERMOUTH_LIB) |
| midimod_destroy(vermouth_module); | cmvermouth_unload(); |
| vermouth_module = NULL; | |
| #endif | #endif |
| } | } |
| } | } |