mp3 playback breaks audio session

Home Forums OpenEars mp3 playback breaks audio session

Viewing 4 posts - 1 through 4 (of 4 total)

  • Author
    Posts
  • #1026342
    DavidWu
    Participant

    In my App I will play mp3 for 15 sec, then I pause the audio player to let OpenEars to listen what user say. However I will get some error like “AVAudioSeeion.mm:646: -[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that running I/O. All I/O should be stopped or paused prior to deactivating the audio session” or there is already listening seeion, so I have to stop that listening session the wait the didstoplistening callback, then I can start a new listening version. How to fix this situation?

    #1026344
    Halle Winkler
    Politepix

    Welcome,

    This is because the media player you are using is overriding the OpenEars audio session settings which are needed. It should be fine if you use AVAudioPlayer to play back WAV files or another uncompressed format.

    #1026346
    DavidWu
    Participant

    if I don’t want to use OpenEars, can I just set the delegate to nil or I have to do something else?

    #1026348
    Halle Winkler
    Politepix

    Take a look at the documentation for the class you want to stop using to see if you need to do something specific.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.