Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ucsd!sdcc6!sdcc13!cpenrose From: cpenrose@sdcc13.ucsd.edu (Christopher Penrose) Newsgroups: comp.sys.next Subject: Re: Soundfiles Message-ID: <17776@sdcc6.ucsd.edu> Date: 25 Mar 91 21:56:58 GMT References: <1991Mar24.195924.3238@cunixf.cc.columbia.edu> Sender: news@sdcc6.ucsd.edu Organization: University of California, San Diego Lines: 29 In article <1991Mar24.195924.3238@cunixf.cc.columbia.edu> kasdan@cunixa.cc.columbia.edu (John Kasdan) writes: > >What is a reference for the format of the Soundfiles? From the >on-line documentation, I get the impression that data is stored in the >form of 1 byte which is interpretted by something called mulaw. How >do I find out what all this means? To be more specific, I would like >to be able to get my hands on data in pure amplitude form, so as to be >able to do FFT work on it. Like, is there some form of conversion to >16 bit format, and would that do what I want? look at the header files in /usr/include/sound. Here is an excerpt from soundconvert.h: unsigned char SNDMulaw(short n); short SNDiMulaw(unsigned char m); /* * Routines to convert from 8 bit mulaw sound to/from 16 linear sound. * SNDMulaw returns the mulaw value for the given 16 bit linear value, * and SNDiMulaw returns the 16 bit linear value for the given mulaw value. */ soundstruct.h will give you some info on the header that is prepended to each NeXT soundfile. Look at the on-line documentation again. It is very helpful. Christopher Penrose jesus!penrose