Reply To: How to deallocate OpenEars singleton (2.0) ?

Home Forums OpenEars How to deallocate OpenEars singleton (2.0) ? Reply To: How to deallocate OpenEars singleton (2.0) ?

Halle Winkler

Thanks for turning verbosePocketsphinx on, but do I need to see the complete logs from the start of the app to everything that is printed out in a failed stopListening. Please make sure not to show any more logs which are excerpted and refer to a single event in the session:

The other thing that is quite important is turning on verbosePocketsphinx so that your logging is complete, and showing your entire app session’s OpenEars logs rather than editing it down, because there is no way to know at what stage in the logging something significant to the issue you are seeing will happen.

By the way, I must mention that OpenEars works well with Unity as long as I keep it listening. Once StopListening is called though, things can get quirky – and that’s why I avoid calling it during my application’s lifetime. However, plugging the headphones is causing StopListening to be called without my consent, so I’m trying to find a way to deal with it.

OK, I’m glad to hear that it is largely working and issues are clustering around a specific behavior that is possible to troubleshoot. The issue here isn’t that route changes call stopListening on their own (this is very important behavior: there are many things that can happen in the user’s app session that you don’t control that requires stopping and restarting listening, such as an incoming call, a media server reset, a route change with route characteristics that would cause the audio unit callback to fail, etc) but that stopListening doesn’t work and you have a workaround for it which requires twice as many calls to the audio session at a time when OpenEars is trying to manage its own session. So the part to focus on troubleshooting, I’d say, is making it so you don’t need to use your workaround.

When I asked what Unity was doing with the audio, I meant that on your side of things you should do a bit of research on what kinds of audio settings Unity is trying to enforce in your app, so we can get to some hypotheses about why it prevents stopListening from working normally. I can’t do that because I’m not a Unity user or developer.