Re: Threading
Re: Threading
- Subject: Re: Threading
- From: Urs Heckmann <email@hidden>
- Date: Thu, 7 Aug 2003 00:06:33 +0200
Okay,
if it doesn't break the specs, it may be valid.
The basic problem is that you need a) a longer queue which can never be
safe enough or b) some intelligence that you can hardly debug due to
the rareness of that situation. Or you do some "double queueing" for
the worst case.
To illustrate: My current queue has only 8 entries and works fine,
because my synth has only 8 voices and the queue thinks about what it
does. It can sort out stupid events, like 2048 Note-Offs when pressing
the Midi interface's panic button. But for tricky situations (Notes
being shorter than the largest timestamp) it will directly manipulate
the memory of played voices. Latter is a linked list. If the list gets
interrupted by pulling while being reordered, we're in an exceptional
mess 8-)
Furtherly, for VST ports you have to do some more effort, because VST
specs grant thread safety.
However, dunno if I need example code, but a reference is highly
appreciated! So send your stuff over 8-)
Cheers,
;) Urs
Am Mittwoch, 06.08.03, um 21:50 Uhr (Europe/Berlin) schrieb Bill
Stewart:
We had some issues with this with the way that QuickTime calls us...
(but this wouldn't affect you guys of course)
To resolve this, we added a cueing mechanism for the New Note calls
and dequeued these with each render call...
I'm not sure that we've ever explicity denied this possibility
however, so there is nothing illegal about this. The queueing that we
did for the new notes is not that onerous and we'd be happy to give
out this code to anyone who want this... It should be usable with any
synth unit with some minor changes...
Bill
On Wednesday, August 6, 2003, at 04:51 AM, Urs Heckmann wrote:
Hi Angus,
wow. That renders timestamps a joke, huh?
Any chance to get the name of such host? - I should better check if
my Music Device produces any hanging notes or even crashes due to
queueing problems before I release it...
Well, if I take Apple's documentation, Logic is the standard host to
look at. I havn't had any hanging note/crash after several minutes of
recorded and live wild-forearm-play, accompanied by chaotic
start/stop sequencer - But of course, I'd prefer to be on the safe
side (and exclude that host from my compatibility list, hehe 8-)
Thanks,
;) Urs
Am Mittwoch, 06.08.03, um 13:34 Uhr (Europe/Berlin) schrieb Angus F.
Hewlett:
I've seen hosts do this, b/c they run their MIDI I/O in a different
thread
to CoreAudio's rendering thread. Whether or not they are compliant,
that's
a different matter :-)
At 01:20 PM 8/6/2003 +0200, Urs Heckmann wrote:
Hi list,
just a quick question:
Am I right that an AU host may never ever send a Music Device any
sort
of Note/Midi/Control events (anything timestamped, to be precise)
during an ongoing Render() call or vice versa, even on
multiprocessor
systems and whatever?
Thanks,
;) Urs
_______________________________________________
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.
=======================================================
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.
-- mailto:email@hidden
tel: +1 408 974 4056
_______________________________________________________________________
___
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
_______________________________________________________________________
___
_______________________________________________
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.