/*****************************************************************************
** This is part of the CTSim program
-** Copyright (C) 1983-2000 Kevin Rosenberg
+** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: consoleio.cpp,v 1.2 2000/06/19 19:04:05 kevin Exp $
+** $Id: consoleio.cpp,v 1.4 2001/01/27 21:02:20 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
}
+/* NAME
+ * beep sound a beep to user
+ *
+ * SYNOPSIS
+ * beep()
+ */
+
+void cio_beep (void)
+{
+ cio_tone (2000.0, 0.3);
+}
+
+/* NAME
+ * tone play a frequency sound for some duration
+ *
+ * SYNOPSIS
+ * tone (freq, length)
+ * double freq frequency to play in Hertz
+ * double length duration to play note in seconds
+ */
+
+void
+cio_tone (double freq, double length)
+{
+#if 1
+ fprintf(stdout, "\007");
+#else
+ cio_spkr_freq (freq); /* Set frequency of tone */
+ cio_spkr_on (); /* Turn on speaker */
+ pause (length); /* Pause for length seconds */
+ cio_spkr_off (); /* Turn off speaker */
+#endif
+}