diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c
index d44dd6c0a0b20a6f31315d4f58ad880ef5122da9..e47d97f4af2633ea77b83651005f46748a8f2b5c 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