Code : Tout sélectionner
#KIOCSOUND = $4B2F
#O_SYNC = $10
Procedure Beep_(Milliseconds,Tone)
fd = open_("/dev/console", #O_SYNC,0)
If (fd = -1)
PrintN("Error: can't open /dev/console")
End
EndIf
ioctl_(fd, #KIOCSOUND, Tone)
Delay(Milliseconds)
ioctl_(fd, #KIOCSOUND, #Null)
close_(fd)
EndProcedure