From 7c6b23c81de8e86065b333be4bcad0ec70b39ef4 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 20 Jan 2005 06:25:29 +0000 Subject: [PATCH] Don't attempt to use soundcard support if machine/soundcard.h fails to be included (or is missing a basic #define) --- src/xpdev/xpbeep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c index d44dd6c0a0..e47d97f4af 100644 --- a/src/xpdev/xpbeep.c +++ b/src/xpdev/xpbeep.c @@ -207,6 +207,7 @@ void DLLCALL unix_beep(int freq, int dur) void DLLCALL SineBeep(double freq, DWORD duration) { +#ifdef AFMT_U8 int dsp; int format=AFMT_U8; int channels=1; @@ -251,5 +252,8 @@ void DLLCALL SineBeep(double freq, DWORD duration) wr+=i; } close(dsp); +#else + unix_beep((int)(freq+.5),duration); +#endif } #endif -- GitLab