From owner-freebsd-multimedia Fri Sep 18 11:09:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA29909 for freebsd-multimedia-outgoing; Fri, 18 Sep 1998 11:09:12 -0700 (PDT) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA29903 for ; Fri, 18 Sep 1998 11:09:10 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id LAA27620; Fri, 18 Sep 1998 11:08:46 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma027612; Fri Sep 18 11:08:22 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id LAA18463; Fri, 18 Sep 1998 11:08:21 -0700 (PDT) From: Archie Cobbs Message-Id: <199809181808.LAA18463@bubba.whistle.com> Subject: Re: (oops!) converting sound from /dev/audio format to /dev/dsp In-Reply-To: <19980918123025.A697@znh.org> from Zach Heilig at "Sep 18, 98 12:30:25 pm" To: zach@gaffaneys.com (Zach Heilig) Date: Fri, 18 Sep 1998 11:08:21 -0700 (PDT) Cc: luigi@labinfo.iet.unipi.it, zach@gaffaneys.com, freebsd-multimedia@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Zach Heilig writes: > The problem is: I now have two formats of files... linear seems to be much > easier to work on (when I'm writing the filter programs -- I figured out > linear by looking at a graph of part of a file, ulaw is not as obvious). Below is a short C file that converts between linear and u-law. It's handy if you just need to do that, rather than installing sox. I snarfed it off the net somewhere once. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com begin 664 ulaw.c.gz M'XL(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