Re: from (Aiff.h || soundmanager) to OS X
Re: from (Aiff.h || soundmanager) to OS X
- Subject: Re: from (Aiff.h || soundmanager) to OS X
- From: email@hidden
- Date: Tue, 4 Sep 2001 15:20:22 -0500 (CDT)
Hey,
Thanks for the advice. I managed to find x80told() [is there an
ldtox80()?] until I write sample rate convertors (e.g. 48khz to 44.1khz)
I'm just using the long double to divide the audiodevice's rate and use
that as a multiplier for how long to hold samples per place in the
audioBuffer.mData. As in my other post (converting aiff sound data to
Audiobuffer.mData) I'm mainly just stuck on how to segment the sound data
into the proper byte-sized pieces according to the bit-depth field and
then convert that to a (properly scaled?) float (which seems to be the
format of choice for the AudioBuffer). I guess it would be more
appropriate to deal with that issue in that thread - again sorry about
splitting up the subjects but I thought this post wouldn't be made as I
was offlist at the time I sent it. Perhaps my co-worker who uses C all the
time with help be able to help me.
I was actually surprised by how easy it was to parse the aiff headers,
with the exception of a very few tricks (e.g. x80told, littleEndian) I had
to pick up from more sample code searches I actually had the main part of
it done in a few hours. On the other hand, I have to say that Apple's
documentation on the file format is actually much less complete than on
other sites which post the preliminary docs from '91. Those other sites
are the only reason I have the formats for any of the chunks outside of
the basic 5. As far as the AudioConverter, I'll have to wait to see how
that works as I'm not worth giving early access (yes, I'm crying...on
the inside). And then there's that matter of paying $20 for the
fixes and not being able to download it...errr.
Thanks,
Ben