Home › Forums › OpenEars › Bluetooth Remote Control Ver 2.0.3 › Reply To: Bluetooth Remote Control Ver 2.0.3
So, one last question before I continue… Below I have a screenshot from my app with the remote control functions. Put simply the Pause never changes to a Play button when the OEPocketsphinxController starts listening. What I am noticing is that when I remove the startListening and insert a bit of code it works again… Is this an audio coexistence problem too?
I remove this…
[[OEPocketsphinxController sharedInstance] startListeningWithLanguageModelAtPath:self.lmPath dictionaryAtPath:self.dicPath acousticModelAtPath:[OEAcousticModel pathToModel:@"AcousticModelEnglish"] languageModelIsJSGF:FALSE]; // this start listen specifically messes up the bluetooth control.
and insert this… and Pause/Play works again.
NSError *error = nil;
AVAudioSession *aSession = [AVAudioSession sharedInstance];
[aSession setCategory:AVAudioSessionCategoryPlayAndRecord
withOptions:AVAudioSessionCategoryOptionAllowBluetooth
error:&error];
[aSession setMode:AVAudioSessionModeDefault error:&error];
[aSession setActive: YES error: &error];