RE: MIDIClientCreate Arguments
RE: MIDIClientCreate Arguments
- Subject: RE: MIDIClientCreate Arguments
- From: Muon Software Ltd - Dave <email@hidden>
- Date: Mon, 28 Feb 2011 10:27:48 +0000
- Acceptlanguage: en-US, en-GB
- Thread-topic: MIDIClientCreate Arguments
I'm not familiar with the exact functions/API in question, but normally a callback function is a static/global function rather than a class member function - so assuming you're not using lots of other globals and have all your application logic nicely encapsulated in classes, you will not be able to access any of those classes from within the callback function.
So when you set up the callback, use the argument to pass over a pointer to whatever data or objects you will need access to in the callback. You will get given back the pointer via the same argument each time the callback fires so you can access your data. Then all you need to do is check it is valid and cast it to the appropriate type to use it.
Hope this helps
Dave
-----Original Message-----
From: coreaudio-api-bounces+dave=email@hidden [mailto:coreaudio-api-bounces+dave=email@hidden] On Behalf Of Matthew Hubble
Sent: Monday, February 28, 2011 9:48 AM
To: email@hidden
Cc: email@hidden
Subject: Re: MIDIClientCreate Arguments
So what does the function do with this pointer? What are some possible uses?
Thanks,
Matt
_______________________________________________
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