From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 7DADEBB84 for ; Sat, 3 Jun 2006 19:25:58 +0200 (CEST) Received: from chokecherry.srv.cs.cmu.edu (CHOKECHERRY.SRV.CS.CMU.EDU [128.2.185.41]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k53HPuTu010045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sat, 3 Jun 2006 19:25:58 +0200 Received: from stratocaster.home (c-24-3-154-200.hsd1.pa.comcast.net [24.3.154.200]) (authenticated bits=0) by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id k53HPrOL028112 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 3 Jun 2006 13:25:56 -0400 (EDT) Received: from ecc by stratocaster.home with local (Exim 4.62) (envelope-from ) id 1FmZsm-0004PS-Rt for caml-list@yquem.inria.fr; Sat, 03 Jun 2006 13:25:52 -0400 Date: Sat, 3 Jun 2006 13:25:52 -0400 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Using the PC speaker Message-ID: <20060603172552.GA16933@localhost> Mail-Followup-To: caml-list@yquem.inria.fr References: <20060603165840.GA7222@Galois> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20060603165840.GA7222@Galois> User-Agent: Mutt/1.5.11+cvs20060403 From: Eric Cooper X-Miltered: at nez-perce with ID 4481C624.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 stub:01 2006:98 wrote:01 caml-list:01 dev:01 graphics:02 sebastien:05 arguments:07 speaker:07 speaker:07 function:08 edu:08 i'm:08 jun:09 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 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