Re: Calling Java code from an audio or Midi callback (Bill Stewart)
Re: Calling Java code from an audio or Midi callback (Bill Stewart)
- Subject: Re: Calling Java code from an audio or Midi callback (Bill Stewart)
- From: Stephane Letz <email@hidden>
- Date: Wed, 17 Apr 2002 09:40:28 +0200
>
I usually cache the instance of the JavaVM in the init call, then use the
>
Attach method to get the env for whatever thread I'm being called on (this
>
is a no-op in most cases where its already got that context for that thread)
OK I'll do that.
What is still not clear for me is if a need to use "Detatch" somewhere?
>
>
>> You could use the CAJava callbacks directly and have them do this work for
>
>> you - then your Java code will just run when the I/O cycle fires.
>
>
>
> Well I don't want to use the CAJava callbacks directly but try to do what
>
> they are doing.
>
>
Why not? They do all this work for you...
Because I'm porting code (actually MidiShare) that should'nt use any
specific MacOSX code. I would like to use the same method, that is calling
back Java code into the real time interrupt, on Linux and Windows also.
>
>
Actually - you shouldn't be using *another* time constrained thread - the
>
reasons for which we'll be covering in some detail at this years WWDC...
>
>
>
You certainly can use other threads - we'll also be going through this as
>
well at some of the WWDC sessions (and code will be made available as well).
>
>
I'm glad to see that this problem (doing all processing in the real-time IO
or not) will be explained since it was not so clear after reading several
mails on this list.
Thanks
Stephane Letz
Grame: Centre National de creation musicale
9, Rue du Garet
69001 Lyon
Tel: 04-72-07-37-00
Fax: 04-72-07-37-01
Web: www.grame.fr
_______________________________________________
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.