Thank you very much for your response and the link. I realized long ago that sound API callback is probably called not even from a separate thread but from a interrupt service routine that handles the interrupt raised by Palm sound card. What I really need is to prevent Palm OS from unloading my code when another app is about to be launched. In this case I suspect my sound call back will be called as long as playback continues. However, if my code will be unloaded when another app starts and I do not stop playback device freezes. Again, I do not need multithreading beyond what Palm OS 5 already provides. I just need to continue executing my audio playback code after app has exited.
"David Beers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Alexander Galkin wrote: > "But executing app in background is > totally possible. Look at RealPlayer, it can run in a background with no UI > while another app is running normally. Palm itself has resident program > ("Find") that can be launched while another app is running without exiting > it." > > It's true that background audio threads were added in OS 5. See the > Streaming Sound Manager. Also some of the NetLib stuff happens in a separate > thread. But as "threads" like the following bear out, running an > application in a background thread is not otherwise supported by the OS: > http://www.escribe.com/computing/pcpqa/index.html?by=OneThread&t=Multithreading%20in%20Palm%20OS%205 > > The Find application doesn't let apps run in the background. When you > launch Find it sends a sysAppLaunchCmdSaveData launch code to all the apps > on the device so an open app can save unsaved data, then a > sysAppLaunchCmdFind to them all to query the databases of apps that support > Global Find. It's just an elaborate hand-off of a single thread from one app > to the next. > > Welcome to Palm OS! :) If you don't like it, check back in a few months > when OS 6 is out. There may be some multi-tasking help for you there! > > David > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
