• 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
Re: Stuck MIDI notes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stuck MIDI notes


  • Subject: Re: Stuck MIDI notes
  • From: Kurt Revis <email@hidden>
  • Date: Wed, 30 Oct 2002 11:15:13 -0800

On Wednesday, October 30, 2002, at 10:01 AM, Robert Grant wrote:

I'm occasionally getting stuck notes with Rax and it's making me wonder whether
I'm handling the incoming MIDI data properly. I'm basically following the Echo.cpp
example and walking through the packets submitting them to the Music Device.

I'm now wondering whether I'm taking too long in the handler and thus the buffer
I was passed is getting diddled before I'm done and perhaps overwriting my
note off messages.

I don't think there's any way that buffer could be overwritten while you are using it. As I understand it: In your app, the code which receives MIDI data from the MIDIServer runs entirely in the same thread as your MIDI read proc. While your read proc is running, there's no way to receive more data from the MIDIServer--it should be queued up and handled when your read proc returns.

I suppose if you take a long time in your read proc and a lot of data is coming in, this queue could overflow, but I've never encountered a problem like that. For all I know CoreMIDI takes steps to stop this from happening.

Anyway, it's easy to test your hypothesis: as the first thing in your read proc, make a copy of the packet list, and then do your work using the copy, not the original.

--
Kurt Revis
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Stuck MIDI notes
      • From: Robert Grant <email@hidden>
References: 
 >Stuck MIDI notes (From: Robert Grant <email@hidden>)

  • Prev by Date: AU - CreateElements
  • Next by Date: Re: Stuck MIDI notes
  • Previous by thread: Stuck MIDI notes
  • Next by thread: Re: Stuck MIDI notes
  • Index(es):
    • Date
    • Thread