• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Is there something wrong here (AU Properties)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Is there something wrong here (AU Properties)
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: AuSampler - Play out a one shot sample for looping MusicTrack
  • Next by Date: Please Ignore: This is only a test
  • Previous by thread: Re: AuSampler - Play out a one shot sample for looping MusicTrack
  • Next by thread: Re: Is there something wrong here (AU Properties)
  • Index(es):
    • Date
    • Thread