Re: Don't exchange pointers, was Re: Objective-C++/C++ with CocoaUI Issue...
Re: Don't exchange pointers, was Re: Objective-C++/C++ with CocoaUI Issue...
- Subject: Re: Don't exchange pointers, was Re: Objective-C++/C++ with CocoaUI Issue...
- From: William Stewart <email@hidden>
- Date: Tue, 20 Jun 2006 15:53:18 -0700
On 20/06/2006, at 12:58 PM, Richard Burnett wrote:
I should have been more clear. In the instance where I pass data to
the AU from the UI, the structs are allocated and filled out in the
UI. I then pass a pointer to them in AudioUnitSetProperty. When I
get the corresponding call in the AU, I copy the data into a local
struct in the AU. It works flawlessly in my experience. Sorry for
adding any confusion.
Okay, I understand now, that makes a lot more sense. Yes, I am
guilty of passing pointers back out of the AU into the UI and
calling them from within the UI. I mainly did this because it made
my code quite simple. I am going to have to rethink how I am doing
certain updates. Basically, this was the issue:
1.Slide a slider in the UI
2.The action pushes the new parameter to the AU
3.I called a function in the AU to update the LFO class
4.I redrew the LFO waveform (called display on it, custom class).
I had previously used the property to pull the instances of the LFO
class to the AU.
The correct way to do this I am assuming is to pass a structure
holding the data locations I need that is in the UI namespace and
call the property at step 3, then redraw using the details in the
struct in the UIs namespace.
yes
Bill
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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