5

I use AVCamCaptureManager class from AVFoundation framework. At the same time I want to use volume up button to take a picture.

As I understood, the only possible solution nowadays is to use audio session (turn it on and listen to changes in volume). I started to use RBVolumeButtons class from here https://github.com/blladnar/RBVolumeButtons

When my app launches, the AVCamCaptureManager initializes audio session. Then I need to start to listen to changes in volume, so RBVolumeButtons initializes a new audio session, that interrupts the previous one. Consequently, camera stops, but I can use volume buttons.

How to avoid this interruption, and how to use volume buttons and camera at the same time? Maybe I can run two audio sessions at the same time? Or maybe there is a way to get access to AVCamCaptureManager's audio session and use it?

Thank you a lot for considering answering my question!

P.S. I use this line to add property listener inside RBVolumeButtons class:

AudioSessionAddPropertyListener(kAudioSessionProperty_CurrentHardwareOutputVolume, volumeListenerCallback, self);
  • hi, did you find any solution to this. Facing the same issue, i cant capture audio if i initialise RBVolumeButtons :| – ash_win Oct 05 '15 at 14:38

0 Answers0