For a custom Wwise mixer plugin we would like to give our sound designers the option to specify speaker locations in either Cartesian (X,Y,Z) or spherical (r,theta,phi) coordinates. For each speaker there are thus 6 defined property fields. The problem we are encountering now is how to keep these fields synchronized, so that changing one set of coordinates will update the other set accordingly.
Looking at the Wwise documentation I do not see a single good entry point that would allow us to modify properties both in the authoring plugin and the runtime/sound engine plugin.
The authoring plugin receives NotifyPropertyChanged() callbacks where we could calculate coordinates and then use IPluginPropertySet::SetValue() to update all affected fields. Obviously NotifyPropertyChanged() is authoring-time only and would not be called during gameplay.
The runtime/sound engine plugin receives SetParam() calls. Because the IAKPluginParam class has no pointer to the sound engine plugin I cannot directly update the other coordinate fields in response to SetParam calls. Looking at some of the sample code I see that one option is monitoring changes to any parameters and then inside of OnFrameEnd() recalculate all the fields. However, OnFrameEnd() is only called while the plugin is processing sounds, so it would not be called while the user is typing values into the text fields.
We can work around this in a couple of ways but that would mean either losing RTPC capabilities or duplicating code. What is the best approach here?