OpenEars AudioSession

Home Forums OpenEars OpenEars AudioSession

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

  • Author
    Posts
  • #1027408
    romie
    Participant

    Hi,

    I’m currently using AVAudioPlayer to play a sound before I begin my OpenEars session, as I’m listening to a audio button press (i.e. headphone buttons) to activate startListening(). I’d like my own sound to continue after startListening() has begun, so that I can receive when the second button press has happened so that I know to stop the listening session.

    Currently, as OE starts, the AudioSession seems to default to the system session and if I press the play button on my headphones, music begins from the iOS Music App. Restarting the player, or restarting the session doesn’t seem to fix this issue.

    Would you have any idea why this might be? And potentially any suggestions on how to over come this issue?

    #1027410
    Halle Winkler
    Politepix

    Welcome,

    Take a look at the FAQ to understand the general audio coexistence issues: https://www.politepix.com/openears/support

    OpenEars has audio session settings that it requires in order to function, so it will always reassert them when listening is started. This may also change the play button behavior as a side effect. AVAudioPlayers ought to work more or less as expected if started and stopped inside of the started OEPocketsphinxController session, though.

    I don’t quite understand this, maybe I can help more once I do:

    I’m listening to a audio button press (i.e. headphone buttons) to activate startListening(). I’d like my own sound to continue after startListening() has begun, so that I can receive when the second button press has happened so that I know to stop the listening session.

    What is the relationship between these button presses and listening? Don’t you want to respond to their touch callbacks rather than their sounds?

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