Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!shelby!polya!ali From: ali@polya.Stanford.EDU (Ali T. Ozer) Newsgroups: comp.sys.next Subject: Re: HELP! Voice Mail Format? Message-ID: <9861@polya.Stanford.EDU> Date: 9 Jun 89 18:09:35 GMT References: <3523@orca.WV.TEK.COM> Sender: Ali T. Ozer Reply-To: aozer@NeXT.com (Ali Ozer) Distribution: na Organization: . Lines: 24 In article <3523@orca.WV.TEK.COM> mhorne%ka7axd.wv.tek.com@relay.cs.net writes: >1) Does the NeXT system have a native file format for audio streams? I know >very little about the audio sampling capabilities in the NeXT (hence these >questions:), so assuming one can easily sample a stream of audio from the mic >and save it in a file, what format do they save it in? Is any compression >done on the data, or is it just straight binary? Voice Mail data is stored in mu-law encoded format, which allows 12-bit dynamic range in 8-bits. The data is sampled at 8012.8 Hz, and, currently at least, is not compressed. The data files also have a header section which is actually a "SNDSoundStruct," described in page 10-9 of the 0.9 Technical Documentation. (This structure is also available online, in /usr/include/sound/soundstruct.h. The Sound chapter in the online version of Tech Docs isn't fully updated for 0.9, and contains an older SNDSoundStruct. There is a warning about this in the chapter.) To get at the raw-data stored in sampled sound files, the best move would be to use sound library, or, better yet, SoundKit functions. Functions and methods are provided for recording, playing, editing, displaying, and converting sampled sounds. You can also obtain a pointer to the raw data (with an indication of how it is stored) and use or abuse it as you wish. Ali Ozer, NeXT Developer Support aozer@NeXT.com