Sharing data between UI and AU
Sharing data between UI and AU
- Subject: Sharing data between UI and AU
- From: Howard Moon <email@hidden>
- Date: Wed, 23 Feb 2011 07:12:27 -0800
HI all,
I know that AudioUnits are intended to have the processing code and UI completely separate. But what if the two need to share a large amount of data? For reasonable data sizes, obviously a property can be used, and the data copied between the two. But what if the amount of data is large (i.e., several Mb)? In order for the copy-via-property approach to work, I'd need to triple the amount of data storage used: 1 copy that the UI can modify at leisure, and two copies on the DSP side (one that is "live" and in use by the DSP while the other is available for being "filled" with data from the UI). That's not a very practical method, as it takes an inordinate amount of both time and memory to accomplish.
What would be easiest would be to be able to simply pass pointers to memory between the two parts, but that's not feasible when the two parts run in separate spaces.
I know that it is at least *possible* to combine the DSP and GUI portions of an AU, as witnessed by the FXpansion VST2AU wrapper, which wraps a VST plug-in whose structure includes both portions internally (and thus can share data with no problem other than preventing read/write clashes). But that doesn't mean that's the best (or only) way to go, necessarily. What I'm looking for is the *best* way to share this amount of data. I'll need to look at exactly how FXpansion accomplishes it, to see if it's what I might need to do. But I'm looking for alternatives, (esp. since it doesn't inherently support Cocoa).
The primary concern, naturally, is that the DSP code can instantly access any random portion of the data, with no delay for a request for that data to be fulfilled. My question is, is there a way I can store a large data array in my DSP, yet have the GUI access it for display of that data, (and modification of that data when not blocked by the DSP)? Or has Apple's decision to completely separate the two parts left me out in the cold?
Thanks,
Howard
_______________________________________________
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