Re: Audio Unit Properties that are CFStringRef
Re: Audio Unit Properties that are CFStringRef
- Subject: Re: Audio Unit Properties that are CFStringRef
- From: Per Bull Holmen <email@hidden>
- Date: Mon, 05 Mar 2012 14:43:55 +0100
Den 07:18 5. mars 2012 skrev David Duncan <email@hidden> følgende:
> On Mar 4, 2012, at 9:32 PM, Per Bull Holmen wrote:
>
>> Den 04:27 5. mars 2012 skrev David Duncan <email@hidden> følgende:
>>> Your assumption is that because you receive a pointer type, that the pointer must be valid in both address spaces.
>>
>> No, my assumption is that if I pass a pointer type one address space,
>> then that pointer would be invalid in another address space. I also
>> make the assumption that therefore, if the plugin and view exist in
>> separate address spaces, it would be invalid to the view when passed
>> from the plugin, and that there is no point in passing a pointer that
>> might be invalid to whoever receives it.
>
> Yes, but your question is "how can I get a pointer back if its not valid in one of the address spaces", and the answer is "its not valid in the other address space". Its really that simple, but fundamentally the answer also doesn't matter.
Thanks for your help!
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.
Thanks a lot for your help, anyway.
Per
_______________________________________________
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