from (Aiff.h || soundmanager) to OS X
from (Aiff.h || soundmanager) to OS X
- Subject: from (Aiff.h || soundmanager) to OS X
- From: email@hidden
- Date: Sat, 1 Sep 2001 23:29:00 -0500 (CDT)
Hey,
I'm not certain this is CoreAudio related, strictly speaking, but
it's low level audio on OS X, so I think that's pretty close. I'm
continuing teaching myself audio on OS X by making a class to
read and write in AIFF/AIFC files. I was surprised by all of the things
carried over such as various chunk types (e.g.CommonChunk) and chunk IDs
and heck, even the ID type itself (all through Foundation.h and no other
imports) but I'm confused by a couple things. As a prelude to my other
questions - is an Aiff reader/writer purely redundant with existing API
abilities in OS X? I don't think so but I've been knon to miss things
before I want to make sure of that, although I'll finish this anyway for
the practice (and since I'm done with the chunk reading logic).
First, commonChunk.sampleRate is causing me problems; from the old SM
docs it looks like Extended is a 10Byte type (sometimes shown as 8 hex
which is a bit confusing) and there are various predefined consts for it,
e.g. rate22khz. Do the rate consts exist under the Foundation classes?
Where are up to date references for these consts and structs? The best
descriptions I found for Aiffs were on some anonymous site. I had to
figure out some things, like chunk types' (structs) names and chunkID's
names, e.g. CommentID, by reading old or non-Apple related
aiff docs and trying different capitalization. Also, how do I do
comparisons with Extendeds? After copying over the const rate values
defined in some SM docs (only had 11-44khz) I tried (common.sampleRate ==
rate22050hz) and that apparently is not a valid comparison. I found an old
set of Apple routines to convert from Extended to/from double (IE in OS X
won't copy the address so look up at deja: vosse rates aiff headers) and
am thinking about using them to limit the awkwardness of the Extended type
to only when necessary. Does anyone know alternative methods? Does anyone
use the Extended sample rates throughout their program? Also, anyone know
who at apple I have to ask to use those conversion methods and can I use
it with Open Source code? Out of curiousity, what's with the
1.208926*10^24samples/sec. precision overkill?
Another long, meandering and confused post by me. Thanks for any help.
-Ben D.