• 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
kAudioFileGlobalInfo_AvailableStreamDescriptionsForFormat returns ASBDs with mChannelsPerFrame != 0?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kAudioFileGlobalInfo_AvailableStreamDescriptionsForFormat returns ASBDs with mChannelsPerFrame != 0?


  • Subject: kAudioFileGlobalInfo_AvailableStreamDescriptionsForFormat returns ASBDs with mChannelsPerFrame != 0?
  • From: "Stephen F. Booth" <email@hidden>
  • Date: Sat, 10 Nov 2007 21:54:30 -0800

I've run into a strange issue in Leopard that didn't occur in Tiger. It seems that kAudioFileGlobalInfo_AvailableStreamDescriptionsForFormat is returning some ASBDs with the mChannelsPerFrame set to 1, instead of 0 as I would expect (per the documentation only mFormatID, mFormatFlags, mBitsPerChannel should be set).

I want to obtain a list of the available data formats for a given file format to present to the user. In pseudo-code I do the following:

- Get the kAudioFileGlobalInfo_AvailableFormatIDs for the format in question (in this case, kAudioFileM4AType)
- For each of these format IDs, construct an AudioFileTypeAndFormatID and obtain a list of applicable ASBDs using kAudioFileGlobalInfo_AvailableStreamDescriptionsForFormat
- For each of these ASBDs, get the display name using kAudioFormatProperty_FormatName


Here is the output from my test program:

2007-11-10 21:41:31.538 CATest[688:10b] file type: 'm4af'
2007-11-10 21:41:31.562 CATest[688:10b] data format 0: 'aac '
2007-11-10 21:41:31.609 CATest[688:10b] variant 0: AAC, 1 channels
2007-11-10 21:41:31.630 CATest[688:10b] data format 1: 'aacl'
2007-11-10 21:41:31.639 CATest[688:10b] variant 0: MPEG 4 Low Delay AAC, 1 channels
2007-11-10 21:41:31.659 CATest[688:10b] data format 2: 'ac-3'
2007-11-10 21:41:31.818 CATest[688:10b] variant 0: AC3
2007-11-10 21:41:31.935 CATest[688:10b] data format 3: 'alac'
2007-11-10 21:41:31.941 CATest[688:10b] variant 0: Apple Lossless
The Debugger has exited with status 0.


Have I made an error or should 'aac ' and 'aacl' set mChannelsPerFrame to 0? Obviously I can manually zero the channels before calling kAudioFormatProperty_FormatName, but I don't believe I should have to.

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


  • Prev by Date: renderprocs - some simple questions
  • Next by Date: Can't Read the Audio Units(AULab 2.0)
  • Previous by thread: Re: renderprocs - some simple questions
  • Next by thread: Can't Read the Audio Units(AULab 2.0)
  • Index(es):
    • Date
    • Thread