Reply To: audiosession – mix while starting

Home Forums OpenEars audiosession – mix while starting Reply To: audiosession – mix while starting

Halle Winkler


AVAudioPlayer in the foreground has very little behaviorally to do with background Youtube music or AVPlayer in general – it is a simpler API and generally pretty compatible with OpenEars (I think this is also in the FAQ). However, OEPocketsphinxController will (again, depending on device and OS since this isn’t specified by Apple) often change the sample rate or volume of AVAudioPlayers which are running at the time that recognition is started, for similar reasons to those I mentioned previously. A category of AVAudioSessionCategoryAmbient is unquestionably being changed, since it doesn’t have audio input, even if isn’t changing it in a way that you are noticing affecting the audio output (there are a few questions posted here about how to prevent changes to existing AVAudioPlayer sessions at the time of starting OEPocketsphinxController). I’ll go ahead and close this up since the problems of audio framework coexistence are covered in the FAQ and many questions here so I can’t shed further light on this, which is a side-effect of the design of audio APIs on the device and the limited specification for audio behavior on the platform rather than something I can help out with. Best of luck and take a look at the FAQ for a bit more background here, thanks!