Thanks David,
I have tried the sample codes in that link. it always logs “0” in MyMIDIReadProc().
because that I’m using ARC ?
but when I use MIDIReceive() to trigger MyMIDIReadProc() it could be logs correct value:
-(IBAction)testReceive:(id)sender{
Byte buffer[1024]; MIDIPacketList *packetlist = (MIDIPacketList*)buffer; MIDIPacket *currentpacket = MIDIPacketListInit(packetlist); Byte msgs[3] = {0x90, 40, 100}; currentpacket = MIDIPacketListAdd(packetlist, sizeof(buffer),currentpacket, 0, 3, msgs);
MIDIReceived(self.sourcePoint, packetlist);
}
it works, but I can use this way.
Thanks Tin
Send Coreaudio-api mailing list submissions to email@hidden
To subscribe or unsubscribe via the World Wide Web, visit https://lists.apple.com/mailman/listinfo/coreaudio-api or, via email, send a message with subject or body 'help' to email@hidden
You can reach the person managing the list at email@hidden
When replying, please edit your Subject line so it is more specific than "Re: Contents of Coreaudio-api digest..."
Today's Topics:
1. How to use srcConnRefCon in MIDIReadProc function. (David Hicks)
----------------------------------------------------------------------
Message: 1 Date: Thu, 18 Dec 2014 11:22:52 -0500 From: David Hicks <email@hidden> To: Core Audio Apple <email@hidden> Subject: How to use srcConnRefCon in MIDIReadProc function. Message-ID: <email@hidden> Content-Type: text/plain; charset="utf-8"
Hello Tin, I think you may find your answer here:
http://stackoverflow.com/questions/15586755/coremidi-refcon-passed-to-midireadproc
HTH, David -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.apple.com/mailman/private/coreaudio-api/attachments/20141218/b0000389/attachment.html>
------------------------------
_______________________________________________ Coreaudio-api mailing list email@hidden https://lists.apple.com/mailman/listinfo/coreaudio-api
End of Coreaudio-api Digest, Vol 11, Issue 237 **********************************************
|