1 /***********************************************************************/
5 /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
7 /* Copyright 1996 Institut National de Recherche en Informatique et */
8 /* en Automatique. All rights reserved. This file is distributed */
9 /* under the terms of the GNU Library General Public License, with */
10 /* the special exception on linking described in file ../../LICENSE. */
12 /***********************************************************************/
14 /* $Id: sound.c 6171 2004-03-24 15:02:06Z starynke $ */
18 value caml_gr_sound(value vfreq, value vdur)
20 XKeyboardControl kbdcontrol;
23 kbdcontrol.bell_pitch = Int_val(vfreq);
24 kbdcontrol.bell_duration = Int_val(vdur);
25 XChangeKeyboardControl(caml_gr_display, KBBellPitch | KBBellDuration,
27 XBell(caml_gr_display, 0);
28 kbdcontrol.bell_pitch = -1; /* restore default value */
29 kbdcontrol.bell_duration = -1; /* restore default value */
30 XChangeKeyboardControl(caml_gr_display, KBBellPitch | KBBellDuration,
32 XFlush(caml_gr_display);