home *** CD-ROM | disk | FTP | other *** search
- mac2snd
- =======
-
- ConvertHere's a quick little hack that takes Mac 8-bit digitized sound
- files, and converts them to NeXT 16-bit sound files.Usage:
- convert [-22] filename The program takes a Mac sound file
- "filename" as input, and outputs a NeXT sound file "filename.snd" as
- output. Mac Sound Files:I don't know much about these files, I just
- got my hands on a bunch of them and tried to convert them. I don't
- know what "official type" they are or anything.They seem to be a
- series of 8-bit samples, with no header. The sample speed doesn't
- seem to be included in the file either (so you have to guess). The
- most common speed seems to be 11 kHz sampling, so that is the default
- of my program. If that seems to slow, you can redo it with the '-22'
- switch, which translates the file as a 22 kHz sample.The samples seem
- to be 0x80 based. Everything about 0x80 is a positive level, and
- everything below 0x80 is negative.NeXT sound files:I don't know much
- about these files either (I couldn't find them in the docs). These
- guy do have a header. Much of my info is guessed by looking at other
- files. All header values are 4 byte integers.1Magic Value =
- 0x2E736E642Offset to start of sound (all offsets are from begining of
- file)3Offset to end of sound (this value is not used by the NeXT
- librarys (?). SoundPlayer and SoundEditor both work without this
- value, so I set it to 1+[offset to start])4?? - set it to 3 (Sound
- file type?)5Sampling frequency (1F4C = 8 kHz, 5622 = 22 kHz, ?? =
- 44)6set it to 1 (this could be the stereo flag. I don't think the Mac
- sounds are in stereo)7-8space-filler? (the NeXT has it so I do
- too!)The NeXT sounds are a 16-bit two's complement number. As you
- can tell, I don't have complete info about these formats, but enough
- for the conversion. If you have more info, please send it to me.USE
- THIS PROGRAM AT YOUR OWN RISK. I'm not responsible for any damage to
- your computer in any way. (My speaker didn't blow out!) Since
- there's no header on the Mac files, my program cannot tell if it is
- really sound or not. It will convert any file to the NeXT sound file
- format.Please send me bug reports, or suggestions.
-
- Robert Hoodhoodr@csus.edu
-