Skip to content
Snippets Groups Projects
Commit 0e6f7689 authored by rswindell's avatar rswindell
Browse files

Added "-x" option to choose xpbeep() over Beep() on Win32.

parent e0adfb74
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,8 @@ int octave=4; /* Default octave */
double pitch=523.50/32.0; /* low 'C' */
BOOL use_xp_beep=FALSE;
void play(char *freq, char *dur)
{
char* notes="c d ef g a b";
......@@ -142,8 +144,12 @@ void play(char *freq, char *dur)
len=(d*t)-(d*s);
else
len=(d*t);
if(f)
BEEP(f,len);
if(f) {
if(use_xp_beep)
xpbeep(f,len);
else
BEEP(f,len);
}
else
SLEEP(len);
if(s) {
......@@ -214,6 +220,9 @@ int main(int argc, char **argv)
case 'V':
mode^=NO_VISUAL;
break;
case 'X':
use_xp_beep=TRUE;
break;
default:
usage();
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment