Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!fernwood!decwrl!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!rice!uupsi!mpoint!dave From: dave@msb.com (Dave Lockwood) Newsgroups: comp.sys.atari.st Subject: Re: Converting Sparcstation .au files to Mac/Atari format Keywords: digitized samples .au Message-ID: <1991May12.173027.10784@msb.com> Date: 12 May 91 17:30:27 GMT References: <1991May8.055008.2758@isc.rit.edu> <1991May9.154204.18726@wam.umd.edu> Organization: Meetpoint Station BBS Lines: 24 Converting the .au samples is a snap. According to the audio man page on my system, the Sun audio data is 8 bit signed volume values. The high order bit is a sign bit. If set, the volume is positive (1's compliment), and if the sign bit is 0, the value is a negative volume (also 1's compliment). In a C program reading the Sun audio data, stick this code in the middle of the conversion loop: if(value & 128) value = 128 + (127 - (value & 127)); See...baby food. If the sign bit isn't set, no conversion need be done. The resulting output is a volume level from 0 to 255 with 128 being the zero crossing. Multiply the result by a fraction if you want to change the volume before output. I'll leave the headers up to you. I never monkeyed with that (the man page is rather cryptic about this), and besides, you wouldn't want me to take ALL the fun out of it, would you? ;-) -- A tool that isn't sharp enough to cut | dave@msb.com (Dave Lockwood) you badly isn't sharp enough to use. | UUCP: ...!uupsi!mpoint!dave However, the sharp edges should *NOT* be | Sysop of Meetpoint Station BBS on the handle. | cat flames | mail santa@north.pole