--- np2/macosx/soundmng.cpp 2003/11/14 07:37:29 1.7 +++ np2/macosx/soundmng.cpp 2003/11/28 17:44:19 1.8 @@ -6,7 +6,8 @@ #include "soundmng.h" #include "sound.h" #if defined(VERMOUTH_LIB) -#include "vermouth.h" +#include "commng.h" +#include "cmver.h" #endif #include "soundrecording.h" @@ -33,10 +34,6 @@ static BOOL QS_Avail = FALSE; static _QSOUND QSound; static BOOL QSound_Playing = FALSE; -#if defined(VERMOUTH_LIB) - MIDIMOD vermouth_module = NULL; -#endif - static void (PARTSCALL *fnmix)(SINT16 *dst, const SINT32 *src, UINT size); @@ -201,9 +198,6 @@ static void SoundBuffer_Term(void) { UINT soundmng_create(UINT rate, UINT ms) { UINT samples; -#if defined(VERMOUTH_LIB) - UINT num; -#endif QSound_Playing = FALSE; @@ -228,11 +222,7 @@ UINT soundmng_create(UINT rate, UINT ms) goto qsinit_err; } #if defined(VERMOUTH_LIB) - vermouth_module = midimod_create(rate); - for (num=0; num<128; num++) { - midimod_loadprogram(vermouth_module, num); - midimod_loadrhythm(vermouth_module, num); - } + cmvermouth_load(rate); #endif return(samples); @@ -248,8 +238,7 @@ void soundmng_destroy(void) { SoundBuffer_Term(); SoundChannel_Term(); #if defined(VERMOUTH_LIB) - midimod_destroy(vermouth_module); - vermouth_module = NULL; + cmvermouth_unload(); #endif } }