1995-05-08 10:04:35 -07:00
|
|
|
#include "libgraph.h"
|
|
|
|
|
|
|
|
value gr_sound(vfreq, vdur)
|
|
|
|
value vfreq, vdur;
|
|
|
|
{
|
|
|
|
XKeyboardControl kbdcontrol;
|
|
|
|
|
1995-08-08 06:37:34 -07:00
|
|
|
gr_check_open();
|
1995-05-08 10:04:35 -07:00
|
|
|
kbdcontrol.bell_pitch = Int_val(vfreq);
|
|
|
|
kbdcontrol.bell_duration = Int_val(vdur);
|
|
|
|
XChangeKeyboardControl(grdisplay, KBBellPitch | KBBellDuration,
|
|
|
|
&kbdcontrol);
|
|
|
|
XBell(grdisplay, 0);
|
|
|
|
kbdcontrol.bell_pitch = -1; /* restore default value */
|
|
|
|
kbdcontrol.bell_duration = -1; /* restore default value */
|
|
|
|
XChangeKeyboardControl(grdisplay, KBBellPitch | KBBellDuration,
|
|
|
|
&kbdcontrol);
|
|
|
|
XFlush(grdisplay);
|
|
|
|
return Val_unit;
|
|
|
|
}
|
|
|
|
|
|
|
|
|