This is not quite correct and won't work correctly for 64 bit. The
correct way is to use the offsetof operator:
mBufferList = reinterpret_cast<AudioBufferList*>(new Byte[offsetof
(AudioBufferList, mBuffers) + (mNumberBuffers * sizeof
(AudioBuffer))]);
I'm interested in why the my code isn't compatible with 64-bit,
mostly for my own education, but also because it's just extending a
pre-existing array by the number of additional buffers needed.
Actually - my mistake.
The code we currently have in Tiger was doing this:
However, due to different padding with LP_64 this was leading to an
incorrect (too small) allocation. The code we settled on for handling
ABL sizes is the code I posted above - so that's what you will see in
the Leopard SDK code.
Bill
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who
try.
David Duncan
-- mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden