• 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 notes in Rax and Synthtest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stuck notes in Rax and Synthtest


  • Subject: Re: Stuck notes in Rax and Synthtest
  • From: Philippe Wicker <email@hidden>
  • Date: Wed, 7 May 2003 22:20:41 +0200

On Wednesday, May 7, 2003, at 08:54 PM, Chris Reed wrote:

On Wednesday, May 7, 2003, at 08:52 US/Central, Angus F. Hewlett wrote:

At 05:52 PM 5/6/2003 -0600, Chris Reed wrote:
Interesting... I was under the impression that you should really only
deliver MIDI events to a MusicDevice before the buffer is rendered. That
way there is a clearly defined "0" sample offset.

Yes, but esp. on a dual machine, if it's not clearly defined that the host
must performed mutexing, it's quite possible that MIDI events for the
-next- buffer might start getting delivered while Render() is still doing
its thing.

This is no longer a problem if you use a non blocking FIFO. Events are delivered to the FIFO.


Thanks for bringing this up. It was actually worrying me while I was working on another project a while back (a host).

I really think something about this needs to be added to the official documentation (hint hint ;).

Specifically, does what Angus says below hold true? Or do events received while a buffer is being rendered apply to *that* buffer--which would imply that you want that event to take effect immediately. I would think the former.

Here again, using a non blocking FIFO gives you the choice to do whatever you think is better for your particular use case. Say that your IO buffer is 512 frames long. You may choose to "sample" available MIDI events at the beginning of the render process an do the 512 frames rendering all at a time. Or you may organize your render job as, say, 8 outer loops with an inner loop processing 64 frames and "sample" MIDI events at the beginning of the inner "64" loop.


-chris


Is there any
documentation about what a MusicDevice should do if it receives an event
while a buffer is being rendered, and what 0 means then?

I would be inclined to say that as soon as Render() begins, any events
received are queued for the next Render().

Regards,
Angus.
=======================================================
Angus F. Hewlett, Technical Director
FXpansion Audio UK Ltd - http://www.fxpansion.com
=======================================================
_______________________________________________
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.


Philippe Wicker
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.

  • Prev by Date: Re: Stuck notes in Rax and Synthtest
  • Next by Date: Re: Stuck notes in Rax and Synthtest
  • Previous by thread: Re: Stuck notes in Rax and Synthtest
  • Next by thread: Re: Stuck notes in Rax and Synthtest
  • Index(es):
    • Date
    • Thread