From b289147f8191de031e47b3f258819d75cc3a2595 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Sun, 28 May 2006 07:12:27 +0000
Subject: [PATCH] Fix a couple more bugs in last commit.

---
 src/xpdev/xpbeep.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c
index 452f444b79..3f6cc20765 100644
--- a/src/xpdev/xpbeep.c
+++ b/src/xpdev/xpbeep.c
@@ -230,14 +230,14 @@ BOOL xptone_open(void)
 		return(FALSE);
 	memset(&wh_bufs, 0, sizeof(wh_bufs));
 	memset(wave, 128, sizeof(wave));	/* Ensure that if silence DOES timeout, you still get silence */
-	wh_bufs[0].lpData=wave;
+	wh_bufs[0].lpData=wave[0];
 	wh_bufs[0].dwBufferLength=S_RATE*15/2+1;
 	if(waveOutPrepareHeader(waveOut, &wh_bufs[0], sizeof(wh_bufs[0]))!=MMSYSERR_NOERROR) {
 		sound_device_open_failed=TRUE;
 		waveOutClose(waveOut);
 		return(FALSE);
 	}
-	wh_bufs[1].lpData=wave;
+	wh_bufs[1].lpData=wave[1];
 	wh_bufs[1].dwBufferLength=S_RATE*15/2+1;
 	if(waveOutPrepareHeader(waveOut, &wh_bufs[1], sizeof(wh_bufs[1]))!=MMSYSERR_NOERROR) {
 		waveOutUnprepareHeader(waveOut, &wh_bufs[0], sizeof(wh_bufs[0]));
@@ -412,7 +412,7 @@ BOOL xptone(double freq, DWORD duration, enum WAVE_SHAPE shape)
 	if(wh->dwBufferLength<=S_RATE/freq*2)
 		wh->dwBufferLength=S_RATE/freq*2;
 
-	makewave(freq,wave[curr_wh],wh.dwBufferLength,shape);
+	makewave(freq,wave[curr_wh],wh->dwBufferLength,shape);
 
 	waveOutBreakLoop(waveOut);
 	success=TRUE;
-- 
GitLab