Several months ago I reported a hangup when using sampled sound input on the Tungsten. Several of you were kind enough to verify the hangup by running my stest program. I may have found a work-around for that hangup.
It seems that the hangup occurs with a certain low probability when you call SndStreamDelete() on a running sound input stream. SndStreamDelete() does an implicit call to SndStreamStop(). In tests that I had done two months ago, making an explicit call to SndStreamStop() before SndStreamDelete() did not help with the hangup problem. In fact, even when I inserted a SysTaskDelay() between SndStreamStop() and SndStreamDelete(), it did not help. But today I tried this between the two function calls: t0 = TimGetTicks(); while(TimGetTicks()-t0 < 21) ; (A single sound buffer takes about 9 ticks of time, so the required wait seems to be 2 complete buffers.) This has not hung up in two hours of testing. I am wondering if this busy-wait is somehow different from SysTaskDelay(), which says that it puts the device into "doze mode" for the specified time. Perhaps whatever it is that needs to happen between SndStreamStop() and SndStreamDelete() to prevent a hangup does not happen in doze mode. Anyway, I thought I would revive the topic to see if anyone else is working on sound input applications for the Tungsten and may have observed this hangup. Robert Scott, Ypsilanti, MI (reply through this forum, not by e-mailing me directly) -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
