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
On 2014年12月19日, at 上午4:00, [email protected] wrote:
> Send Coreaudio-api mailing list submissions to
> [email protected]
>
> 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 protected]
>
> You can reach the person managing the list at
> [email protected]
>
> 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 protected]>
> To: Core Audio Apple <[email protected]>
> Subject: How to use srcConnRefCon in MIDIReadProc function.
> Message-ID: <[email protected]>
> 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 protected]
> https://lists.apple.com/mailman/listinfo/coreaudio-api
>
> End of Coreaudio-api Digest, Vol 11, Issue 237
> **********************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com
This email sent to [email protected]