Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Using the PC speaker
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-06-03 (17:25)
From: Eric Cooper <ecc@c...>
Subject: Re: [Caml-list] Using the PC speaker
On Sat, Jun 03, 2006 at 06:58:41PM +0200, Sébastien Hinderer wrote:
> Is there some code available to make the PC speaker beep from within an
> OCaml program, please ?
> The function I'm looking for should take a frequency (and a duration) as
> arguments, like Graphics.sound does, but this should also work in text
> mode. In other words, printing a bell is not enough.

I have some code that does this by writing to /dev/dsp -- it's
Linux-specific and also requires a small C stub.  Email me if you want it.

Eric Cooper             e c c @ c m u . e d u