googlevr / gvr-ios-sdk

Google VR SDK for iOS
http://developers.google.com/vr/ios/
Other
645 stars 191 forks source link

GVR audio periodically attempts to terminate AVAudioSession #304

Open radvani opened 6 years ago

radvani commented 6 years ago

We have an app that's attempting to record audio and video, but this appears to be incompatible while GVR Audio is running, even if GVR audio is paused. It appears that GVR will periodically call [AVAudioSession setActive:withOptions:error] to deactivate the session -- terminating the audio recording we're trying to make. This seems unfriendly to all apps, given that each app only has one AVAudioSession, GVR shouldn't be taking control of the entire app's audio session this way and deactivating it. Is there a known workaround?

This is closely related to this issue, the fix for which resolved one problem but exposed this one.

More detail: we see the following in the logs while making the recording:

[avas] AVAudioSession.mm:1177:-[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.

Everything works when GVR audio is turned off (e.g., never created). Thanks.

Performador commented 6 years ago

We will investigate if we can have more collaborative audio interface with the application.

AlexanderSperka commented 5 years ago

Hi, we are having the same issue. Can you please give any detail when this will be fixed @Performador ?

Did you find a workaround @radvani ?

radvani commented 5 years ago

@AlexanderSperka unfortunately no, we never found a workaround.