• 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
MIDIReadProc problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MIDIReadProc problem


  • Subject: MIDIReadProc problem
  • From: John Alexander <email@hidden>
  • Date: Tue, 07 Aug 2001 11:02:57 -0400

Hi maybe someone on the list can help me out. My problem is this: In my
Carbon application I create a bundle from the CoreMIDI framework, and get
pointers to the functions I need. After setting up a client, adding an input
port and connecting sources, I crash(exit) when my app receives its first
MIDIPacket. None of the CoreMIDI functions return an error.

What would cause my app to crash after receiving a MIDIPacket and calling
the callback? Thanks to anyone who can help!

- John Alexander




static void myProc( const MIDIPacketList *P, void* refCon, void* connrefCon)
{
// do something
}


... get CoreMIDI framework, bundle using CFBundleCreate ...
... and function pointers CFBundleGetFunctionPointerForName ...

err = myMIDIClientCreatePtr(CFSTR("myclient"), NULL, NULL, &client );
err = myMIDIInputPortCreatePtr(client, CFSTR("myinput"), myProc, NULL,
&inport);
err = myMIDIOutputPortCreatePtr(client, CFSTR("myoutput"), &outport);

for( i = 0; i < myMIDIGetNumberOfSourcesPtr(); ++i ){
MIDIEndpointRef src = myMIDIGetSourcePtr( i );
err = myMIDIPortConnectSourcePtr( inport, src, NULL );
}


  • Follow-Ups:
    • Re: MIDIReadProc problem
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: Re: MIDI send problems.
  • Next by Date: Re: MIDIReadProc problem
  • Previous by thread: Re: Where is CoreAudio (aka Getting started...)?
  • Next by thread: Re: MIDIReadProc problem
  • Index(es):
    • Date
    • Thread