The sequence would be as follows:
1) Call startListening
2) Receive delegate message pocketsphinxRecognitionLoopDidStart, but did not yet receive a delegate message pocketsphinxDidStartListening (so we are in the middle of the startup process)
3) an interruption occurs while in the middle of this startup process at precisely the correct time – a crash occurs. I have not received any delegate message about an interruption occuring, so I have not called stopListening.
I have been focused on another project the last few days, but expect return to this soon and I will be able to do more testing.
I guess the larger question is, “what happens if Pocketsphinx is in the middle of executing a startListening cycle and the audio session suddenly becomes unavailable – was available at the start of the call (recogniton loop started) but has not yet started listening and before start listening completes (pocketsphinxDidStartListening not yet called) the audio session becomes unavailable.
Does your code handle this gracefully, or is there some period of time during the startup cycle where a resource is assumed to be there and if it suddenly disappears, the situation can cause a crash?
I realize this is kind of nit-picky for a lot of use cases; I’m just trying to ensure that my app handles this scenario as gracefully as possible. It seems that once the crash occurs, I am no longer able to receive a delegate message when the session becomes available again.
I will work on getting you better information in a couple of days.