From owner-freebsd-multimedia Mon Dec 22 03:17:38 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA16904 for multimedia-outgoing; Mon, 22 Dec 1997 03:17:38 -0800 (PST) (envelope-from owner-freebsd-multimedia) Received: from wakko.visint.co.uk (wakko.visint.co.uk [194.207.134.12]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA16899 for ; Mon, 22 Dec 1997 03:17:31 -0800 (PST) (envelope-from steve@visint.co.uk) Received: from dylan.visint.co.uk (dylan.visint.co.uk [194.207.134.180]) by wakko.visint.co.uk (8.8.5/8.7.3) with SMTP id LAA05946 for ; Mon, 22 Dec 1997 11:18:21 GMT Date: Mon, 22 Dec 1997 11:19:22 +0000 (GMT) From: Stephen Roome To: multimedia@freebsd.org Subject: precise soundcard tuning ? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I wrote a really simple program last night that just writes an X Hz sin wave to a file as raw 16 bit unsigned data. I then used sox to convert this to a WAV file and played it with rplay. Although my program seems to work fine, 440Hz from it just doesn't match the A/440 tuning fork I've got. The computer is about a semitone flat, unfortunately I need it to be perfect (or very close anyway ?). I figured it was possible that I was screwing up in some conversion somewhere, but PI looks right and writing a 2 second file with a sample rate of 44100Hz comes out as 88200 long, which seems correct to me. So, is there something obvious I've missed or is there a problem with the sound driver or with my soundcard that is making my machine play sounds slow ? I'm using a Creative Labs AWE64, and the stock sound driver from current as of December 12, sox12.12 and rplay 3.2.0b6 installed as packages. Any helpful pointers? [If using the pc speaker is going to get me a more accurate pitch then I'll try that, that's all I need] Steve. -- Steve Roome - Vision Interactive Ltd. Tel:+44(0)117 9730597 Home:+44(0)976 241342 WWW: http://dylan.visint.co.uk/