| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Feb 21, 2006, at 1:47 PM, Timothy J. Wood wrote:
Not necessary.
It copies, so stack-based is ok.
To be totally correct, you're supposed to pass in the format atom as well, so the codec knows whether this is data intended for it. Here's how to do it using a Handle: { // we need to add the extension that says "it's little endian". AudioFormatAtom formatData = {0}; AudioEndianAtom endianData = {0}; AudioTerminatorAtom terminatorData = {0}; Handle extension = NULL; formatData.size = EndianU32_NtoB(sizeof(AudioFormatAtom)); formatData.atomType = EndianU32_NtoB(kAudioFormatAtomType); formatData.format = EndianU32_NtoB(dataFormat); // i.e. kFloat32Format, kFloat64Format, k24BitFormat err = PtrToHand(&formatData, &extension, sizeof(AudioFormatAtom)); if (err) goto bail; endianData.size = EndianU32_NtoB(sizeof(AudioEndianAtom)); endianData.atomType = EndianU32_NtoB(kAudioEndianAtomType); endianData.littleEndian = EndianU16_NtoB(isLittleEndian); err = PtrAndHand(&endianData, extension, sizeof(AudioEndianAtom)); if (err) goto bail; terminatorData.size = EndianU32_NtoB(sizeof(AudioTerminatorAtom)); terminatorData.atomType = EndianU32_NtoB(kAudioTerminatorAtomType); err = PtrAndHand(&terminatorData, extension, sizeof(AudioTerminatorAtom)); if (err) goto bail; SoundConverterSetInfo(_soundConverter, siDecompressionParams, *extension); DisposeHandle(extension); } HTH -Brad Ford QuickTime Engineering
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-API mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quicktime-api/email@hidden This email sent to email@hidden
| References: | |
| >Sanity check on AudioEndianAtom usage (From: "Timothy J. Wood" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.