• 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
Crashing when calling MIDISendSysex()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crashing when calling MIDISendSysex()


  • Subject: Crashing when calling MIDISendSysex()
  • From: Stephen Kay <email@hidden>
  • Date: Sat, 19 May 2007 19:10:20 -0400

I'm having some problems trying to get MIDISendSysex() to work in my app.

Mac OS X 10.4.8, PowerMac.

Up until now, I have been using MIDISend() for sysex messages, and just not
doing anything over about 256 Bytes. It's now time to finish implementing
the stuff in my app that handles large/huge sysex dumps.

So I started trying to use MIDISendSysex() today. It crashes directly after
being called, with an access fault, dumping me into the CoreMIDI Lib with I
EXC_BAD_INSTRUCTION.

Question 1:
Anyone know of some example Code that shows how to use MIDISendSysex?
I have been unable to find any example code that shows how to use this.

Question 2:
Here's what I'm doing.  Note that my code works fine for normal MIDISend()
stuff, and has been for 6 months or so, so I know the endpoints and basic
initialization etc. is all fairly robust. So I'm not going to show all of
that here at the moment.

Here's what I'm trying:

It didn't seem to matter whether I specified a MIDICompletionProc or NULL.

data is a Byte ptr to a properly formatted Sysex Message, about 2500 bytes
long. But I tried this with short little messages, and it crashes the same
way.

void MyCompletionProc(void *ptr);
void MyCompletionProc(void *ptr)
{
    // nothing for now
}


MIDIEndpointRef dst = MIDIGetDestination(0);    // just testing

// I know it's a valid endpoint because I can send
// normal MIDI messages to it

If (dst){
    MIDISysexSendRequest sysexSendRequest;

    sysexSendRequest.destination = dst;
    sysexSendRequest.data = (Byte *) data;
    sysexSendRequest.bytesToSend = len;
    sysexSendRequest.complete = false;
    sysexSendRequest.completionProc = (MIDICompletionProc)MyCompletionProc;
    sysexSendRequest.completionRefCon = NULL;

    MIDISendSysex(&sysexSendRequest);
}

Any suggestions?

Thanks,
- Stephen

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Stephen Kay
Karma-Lab :: developers of KARMA
http://www.karma-lab.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


 _______________________________________________
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

  • Follow-Ups:
    • Re: Crashing when calling MIDISendSysex()
      • From: Hidetomo Katsura <email@hidden>
  • Prev by Date: What is the way to set the timestamp for sending MIDI events?
  • Next by Date: Re: Crashing when calling MIDISendSysex()
  • Previous by thread: Re: What is the way to set the timestamp for sending MIDI events?
  • Next by thread: Re: Crashing when calling MIDISendSysex()
  • Index(es):
    • Date
    • Thread