--- np2/win9x/soundmng.cpp 2003/10/18 10:28:12 1.2 +++ np2/win9x/soundmng.cpp 2003/10/26 08:59:53 1.3 @@ -10,6 +10,14 @@ #include "vermouth.h" #endif +#ifdef __cplusplus +extern "C" { +#endif +void __fastcall satuation_s16mmx(SINT16 *dst, const SINT32 *src, UINT size); +#ifdef __cplusplus +} +#endif + #if 1 #define DSBUFFERDESC_SIZE 20 // DirectX3 Structsize @@ -87,7 +95,7 @@ UINT soundmng_create(UINT rate, UINT ms) samples = (rate * ms) / 2000; samples = (samples + 3) & (~3); dsstreambytes = samples * 2 * sizeof(SINT16); - fnmix = satuation_s16; + soundmng_setreverse(FALSE); ZeroMemory(&pcmwf, sizeof(PCMWAVEFORMAT)); pcmwf.wf.wFormatTag = WAVE_FORMAT_PCM; @@ -242,7 +250,17 @@ void soundmng_sync(void) { void soundmng_setreverse(BOOL reverse) { - fnmix = (reverse)?satuation_s16x:satuation_s16; + if (!reverse) { + if (mmxflag) { + fnmix = satuation_s16; + } + else { + fnmix = satuation_s16mmx; + } + } + else { + fnmix = satuation_s16x; + } }