• 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: wow, this actually works!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wow, this actually works!


  • Subject: Re: wow, this actually works!
  • From: Bill Stewart <email@hidden>
  • Date: Tue, 28 May 2002 21:45:23 -0700

Actually

Your thread doesn't have to do anything - you should be able to just put it
into a wait state. CoreMIDI will wake it up through its run loop - then when
its done its work it should just go back into wait...

while (true)
{
synchronized (this)
{
wait();
}
}

Bill

on 28/5/02 7:44 PM, Kenneth Welch wrote:

>> I have already changed my app's version of that thread so it runs once
>> and dies each time I need to call the MIDI methods, in order to get rid
>> of the "while(true) test booleans" loop which is a noticeable CPU
>> strain even with it set to Thread.MIN_PRIORITY.
>
> Though I suppose you could embed a relatively short Thread.sleep()
> command in the loop body to alleviate most of the strain. But that will
> obviously impair one's ability to make those MIDIPort-related calls in
> the thread with good timing accuracy... I don't know enough about
> Scott's application to know if that will matter in his case, but I can
> imagine a few hypothetical situations where it might.
> _______________________________________________
> 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
__________________________________________________________________________
"Thousands of years ago, cats were worshipped as gods. We have never
forgotten this."
__________________________________________________________________________
_______________________________________________
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.

References: 
 >Re: wow, this actually works! (From: Kenneth Welch <email@hidden>)

  • Prev by Date: Re: Sample-Code for simultaneous play and rec
  • Next by Date: Re: wow, this actually works!
  • Previous by thread: Re: wow, this actually works!
  • Next by thread: Re: wow, this actually works! (Scott Ruda, take note :-)
  • Index(es):
    • Date
    • Thread