Skip to content
Snippets Groups Projects
Commit 9dd3684e authored by deuce's avatar deuce
Browse files

Undo last change... DO NOT DO DSP WHILE TIRED! :-)

parent 9f6596d4
Branches
Tags
No related merge requests found
......@@ -60,7 +60,7 @@ void makesine(double freq, unsigned char *wave, int samples)
wave[i]=127;
}
/* Fade out */
for(k=2;k<=10;k++) {
for(k=10;k>1;k--) {
for(;i>0;i--) {
if(!endhigh && wave[i]<=127)
break;
......@@ -96,7 +96,7 @@ void makesine(double freq, unsigned char *wave, int samples)
wave[i]=127;
}
/* Fade in */
for(k=2;k<=10;k++) {
for(k=10;k>1;k--) {
for(;i<samples;i--) {
if(!starthigh && wave[i]<=127)
break;
......@@ -152,7 +152,8 @@ void SineBeep(double freq, DWORD duration)
goto abrt;
if(waveOutWrite(waveOut, &wh, sizeof(wh))!=MMSYSERR_NOERROR)
goto abrt;
SLEEP(duration);
while(!(wh.dwFlags&WHDR_DONE))
SLEEP(1);
abrt:
waveOutUnprepareHeader(waveOut, &wh, sizeof(wh));
waveOutReset(waveOut);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment