[android-developers] Re: Process.setThreadPriority() high priorities

2009-08-14 Thread niko20
Well actually the other thing too is my program is designed so that if it loses focus (OnPause), it stops the audio creation thread. So even though it's priority is set high, it only runs the high thread while the program is in the foreground, so it shouldn't be too detrimental to the entire

[android-developers] Re: Process.setThreadPriority() high priorities

2009-08-14 Thread Dianne Hackborn
Being in the foreground doesn't mean you have exclusive access to the device -- it still needs to be able to respond to incoming calls, etc. There is nothing intrinsically wrong with an application working at audio priority for doing audio work... there is something extremely wrong with it

[android-developers] Re: Process.setThreadPriority() high priorities

2009-08-13 Thread Dmitry.Skiba
This issue is pretty important for my game, as simply changing the priority to a higher value makes it (much) more comfortable to play. Can I rely to this effect or should I go and cut my geometry in half? (again...) Google guys, please answer :) Dmitry On 13 авг, 01:40, Dmitry.Skiba

[android-developers] Re: Process.setThreadPriority() high priorities

2009-08-13 Thread Dianne Hackborn
I believe at the time the doc was written, the intention was to limit priorities, but this was never done. The priorities you mention (urgent display and audio) are NOT for use by applications, except in very special cases (audio can make sense for time-critical audio processing code that can

[android-developers] Re: Process.setThreadPriority() high priorities

2009-08-13 Thread niko20
On Aug 13, 11:29 am, Dianne Hackborn hack...@android.com wrote: I believe at the time the doc was written, the intention was to limit priorities, but this was never done.  The priorities you mention (urgent display and audio) are NOT for use by applications, except in very special cases

[android-developers] Re: Process.setThreadPriority() high priorities

2009-08-13 Thread Dianne Hackborn
As I said, for very carefully controlled code that is doing realtime audio processing the audio permission is appropriate. That is all you should be doing at that priority level, though, and the amount of work being done needs to be very carefully controlled. Btw, the next release should have

[android-developers] Re: Process.setThreadPriority() high priorities

2009-08-13 Thread Dmitry.Skiba
Ok, thank you, that is what I wanted to hear :) Of course my case is not just 'this thing is slow', I need to play two perfectly synced tracks and render opengl scene. I too discourage people from using this priorities unless absolutely necessary. Dmitry On 13 авг, 23:29, Dianne Hackborn