Is there something wrong here (AU Properties)
Is there something wrong here (AU Properties)
- Subject: Is there something wrong here (AU Properties)
- From: Stephen Blinkhorn <email@hidden>
- Date: Wed, 26 Oct 2011 11:09:33 -0600
Hello,
In the code below I'm passing a pointer to a C struct from the GUI to
the AU. The AU uses the pointer to fill in struct data in a
GetProperty() call. Does this approach break the AU/view separation
concept where the view could feasibly be running on a different
machine? Seems like it must do. Any suggestions on the best alternative?
Thanks,
Stephen
typedef struct Event
{
int mMIDINote
int mMIDIVelocity;
} Event;
typedef struct EventProperty
{
int mNumEvents;
Event *mEvents; // << array of C structs
} AS_SequencerTrackProperty;
..then in GetPropertyInfo():
case kAudioUnitCustomProperty_event:
outWritable = false;
outDataSize = sizeof(EventProperty);
return noErr;
..and in GetProperty():
case kAudioUnitCustomProperty_event:
EventProperty *event_property = (EventProperty*)outData;
event_property->mEvents[0]->mMIDINote = 64;
event_property->mEvents[0]->mMIDIVelocity = 127;
return noErr;
_______________________________________________
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