Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?
Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?
- Subject: Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?
- From: Doug Wyatt <email@hidden>
- Date: Fri, 18 Nov 2005 16:45:15 -0800
I wonder what's special about the AIFC's you're looking at. I'm
thinking it could be a bug, or that they could be in an ancient
format for which we don't have a decoder. Would you please write a
bug and attach an example file?
Thanks
Doug
On Nov 18, 2005, at 16:06, john wrote:
Hi Doug,
Here's the code I'm using:
if (!AudioFileOpen(&audioFileFSRef, fsRdWrPerm, 0, &theAudioFileID))
{
UInt32 propertySize = sizeof(theAudioFileStreamDescription);
if (!AudioFileGetProperty(theAudioFileID,
kAudioFilePropertyDataFormat, &propertySize,
&theAudioFileStreamDescription))
{
// Here theAudioFileStreamDescription will
// have all 0's on certain AIFC files, but most I've tried work
}
}
Thanks.
-- John
So you're calling:
AudioStreamBasicDescription &asbd;
UInt32 propertySize = sizeof(asbd);
err = AudioFileGetProperty(someAudioFileID,
kAudioFilePropertyDataFormat, &propertySize, &asbd);
Are you setting propertySize to sizeof(asbd)? If not and
propertySize happens to be zero, then you'll get exactly the
behavior you describe.
Doug
--
Doug Wyatt
Core Audio, Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden