Re: Audio Unit Properties that are CFStringRef
Re: Audio Unit Properties that are CFStringRef
- Subject: Re: Audio Unit Properties that are CFStringRef
- From: David Duncan <email@hidden>
- Date: Mon, 05 Mar 2012 07:53:50 -0800
On Mar 5, 2012, at 5:43 AM, Per Bull Holmen wrote:
> But no, my question was, how can I SEND a pointer (from my Audio Unit)
> that is not valid in the other address spaces. And what does Apple's
> requirement of separate address spaces and "always pass the data by
> value, never by reference" actually mean. I took that to mean "always
> pass the data itself, never a pointer to the data", but this is
> clearly wrong. From how I read your response, this is transparently
> handled by the system, so whatever pointer is received on the other
> end, is valid for whoever receives it. So I don't have to think about
> copying, serializing etc., I just pass the pointer raw, and it just
> works. That's great. Does this mean that I don't have to worry about
> ANY pointer I transmit as a property, or part of a property, as long
> as I don't expect the contents to be directly manipulated in the other
> end? Or is there some special treatment of CoreFoundation types like
> CFStringRef etc... ? I'm not interrested in how things work
> under-the-hood, just how to do things correctly. Also, I was curious
> to know whether I could really trust that an AU and its GUI will work
> if running in separate processes. As long as it's correctly
> programmed, of course.
I'm not entirely certain if we're on the same page after reading this.
The first step is to stop thinking about this as an issue of pointers. The issue is fundamentally about communication, not pointers. If you expect to communicate with the other side by accessing its address space, that will fail. This is take away. The issue isn't that you get a pointer from the API, its that you get that pointer, then expect to dereference and write to it, and see the changes on the other side. If you didn't expect to see changes on the other side, this would be just fine and dandy.
I'm not trying to say that everything will just work, I'm just trying to stress that the issue is one of communication, not one of pointers.
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.
David Duncan
_______________________________________________
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