Re: Questions about AudioStreamBasicDescription
Re: Questions about AudioStreamBasicDescription
- Subject: Re: Questions about AudioStreamBasicDescription
- From: Fredrik <email@hidden>
- Date: Mon, 2 Feb 2009 07:12:06 +0100
Update II. Everything works as expected now. The problem was a simple
spelling error.
Thanks everyone for your input and help.
Fredrik
2 feb 2009 kl. 01.33 skrev Fredrik:
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 isnt
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