• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?


  • Subject: Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?
  • From: john <email@hidden>
  • Date: Fri, 18 Nov 2005 19:06:17 -0500

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
_______________________________________________
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


  • Follow-Ups:
    • Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?
      • From: Doug Wyatt <email@hidden>
References: 
 >AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0? (From: john <email@hidden>)
 >Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0? (From: Doug Wyatt <email@hidden>)

  • Prev by Date: Re: PThread - Core Audio Callback being missed on high load
  • Next by Date: Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?
  • Previous by thread: Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?
  • Next by thread: Re: AudioFileGetPropertyInfo() on kAudioFilePropertyDataFormat returning 0?
  • Index(es):
    • Date
    • Thread