• 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: Questions about AudioStreamBasicDescription
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about AudioStreamBasicDescription


  • Subject: Re: Questions about AudioStreamBasicDescription
  • From: Fredrik <email@hidden>
  • Date: Mon, 2 Feb 2009 01:33:40 +0100

Update. It seems that my mistake was that I introduced the struct after I first used it. Moving the order of things solved this.
Now I´m stuck with one error: storage size of ‘OutFormat’ isn’t known, so I guess I will have to use malloc(sizeof(ASBD)) or something.




2 feb 2009 kl. 01.25 skrev Fredrik:


I´m planning to stick with the ASBD struct, but why does my compiler complain? I noticed that it was no typedef involved in the documentation so I added 'struct' in front of it. This just moves the problem however to OutFormat which is my own struct of this type. The error I get is 'OutFormat undeclared first use in this function', so it seems to me that it´s not included somehow since the complier seems unaware that OutFormat is a struct of the type AudioStreemBasicDescription.


2 feb 2009 kl. 01.00 skrev Brian Willoughby:

AudioStreamBasicDescription is difficult to use unless you're completely aware of the rules for valid and consistent formats. There have been many emails on this list detailing the finer aspects of how to get it right. However, apparently the simplest thing is to just use the C++ class from the Examples directories, and let it maintain the consistency of the various fields in the ASBD structure. You can either use the class directly, sneak a peek at its source to discover all of the rules, or use the archives of this mailing list to learn how to create valid structures.

In my code, I more often use AudioStreamBasicDescription directly. However, I have run into many hurdles during the learning process. Admittedly, I have used CAStreamBasicDescription in a few projects where I simply did not want the hassle of getting all the details just right, as long as it wasn't a greater hassle to incorporate C+ + code into my projects or frameworks.

In an ideal world, CAStreamBasicDescription would be an Objective C class which lives in an Apple-supplied framework. That way, as Apple improves the class, all third-party users of the class API would benefit.


_______________________________________________ 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: Questions about AudioStreamBasicDescription
      • From: Fredrik <email@hidden>
References: 
 >Re: Questions about AudioStreamBasicDescription (From: tahome izwah <email@hidden>)
 >Re: Questions about AudioStreamBasicDescription (From: Fredrik <email@hidden>)
 >Re: Questions about AudioStreamBasicDescription (From: Bob Lang <email@hidden>)
 >Re: Questions about AudioStreamBasicDescription (From: Fredrik <email@hidden>)
 >Re: Questions about AudioStreamBasicDescription (From: Brian Willoughby <email@hidden>)
 >Re: Questions about AudioStreamBasicDescription (From: Fredrik <email@hidden>)

  • Prev by Date: Re: Questions about AudioStreamBasicDescription
  • Next by Date: Re: Questions about AudioStreamBasicDescription
  • Previous by thread: Re: Questions about AudioStreamBasicDescription
  • Next by thread: Re: Questions about AudioStreamBasicDescription
  • Index(es):
    • Date
    • Thread