• 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: MIDI causing CoreAudio overload errors?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDI causing CoreAudio overload errors?


  • Subject: Re: MIDI causing CoreAudio overload errors?
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 4 Apr 2005 12:30:48 -0400

On Apr 4, 2005, at 11:31, Mark Cookson wrote:
I have a report that some applications are getting CoreAudio overload
messages when playing/recording audio and playing/recording MIDI tracks.
They don't get the overload messages without the MIDI processing, so
directly or indirectly, MIDI is implicated.


I'm wondering what priority the MIDI server's threads run at.

Realtime.

Can they
interfere with CoreAudio's threads?

Yes, though in theory they shouldn't be doing enough work to be putting large dents in the CPU time available for audio.


What's the suggested way of transferring MIDI data from a PCI driver? The
current implementation is to use a mach message to send every byte up to a
user client that hands the byte off to MIDI Services. This seems like a bit
of overhead, but it does appear to give the best latency, which was the
primary reason for the implementation choice.


To use a shared memory buffer would require polling, and to use blocking
threads seems to be even more overhead than mach messages.

If you're sending each byte individually, you should be able to cut your messaging overhead by a third by parsing MIDI messages on the sending end and just sending full messages (or 3-byte sysex chunks).


You may find room for further improvement with a shared ring buffer and tiny "ping" Mach messages to signify transitions from empty to non-empty.

I've not had a chance to run Shark to profile the applications yet, but
that's my next stop.

Doug

_______________________________________________
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


References: 
 >MIDI causing CoreAudio overload errors? (From: Mark Cookson <email@hidden>)

  • Prev by Date: MIDI causing CoreAudio overload errors?
  • Next by Date: Audio Unit, Cocoa Interface Question
  • Previous by thread: MIDI causing CoreAudio overload errors?
  • Next by thread: Audio Unit, Cocoa Interface Question
  • Index(es):
    • Date
    • Thread