| I'm trying to use the SetExternalMidiReadCallback() function but for
some reason the userData variable in my callback function keeps
returning null. Here's a snippet of the calback function:
int Cabbage::ReadMidiData(CSOUND *csound, void *userData,
unsigned char *mbuf, int nbytes)
{
Cabbage *midiData = (Cabbage *)userData;
if(!userData){
cout << "\n\nInvalid";
return 0;
}
etc....
It keeps spitting out invalid, and I can't see why. I set the callback
functions just after a precompile and before the full compile like
this:
csound->PreCompile();
csound->SetExternalMidiInOpenCallback(OpenMidiDevice);
csound->SetExternalMidiReadCallback(ReadMidiData);
csound->Compile(".....
Can anyone think of anything I can check to see what the problem is?
I'm at sea a little with this...
Rory.
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |