--- np2/win9x/soundmng.cpp 2006/12/24 00:52:29 1.12 +++ np2/win9x/soundmng.cpp 2007/01/08 01:16:59 1.13 @@ -15,6 +15,12 @@ #endif #if !defined(_WIN64) +#define SOUNDBUFFERALIGN (1 << 2) +#else +#define SOUNDBUFFERALIGN (1 << 3) +#endif + +#if !defined(_WIN64) #ifdef __cplusplus extern "C" { #endif @@ -97,7 +103,7 @@ UINT soundmng_create(UINT rate, UINT ms) // keydispr_delayinit((UINT8)((ms * 10 + 563) / 564)); samples = (rate * ms) / 2000; - samples = (samples + 3) & (~3); + samples = (samples + SOUNDBUFFERALIGN - 1) & (~(SOUNDBUFFERALIGN - 1)); dsstreambytes = samples * 2 * sizeof(SINT16); soundmng_setreverse(FALSE);