Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

The AudioEngine was been interruption by alarm clock #316

Open
ruansf opened this issue Mar 26, 2018 · 3 comments
Open

The AudioEngine was been interruption by alarm clock #316

ruansf opened this issue Mar 26, 2018 · 3 comments

Comments

@ruansf
Copy link

ruansf commented Mar 26, 2018

I plug in my headphones listening my app. I execute this call stop when interruption happen. When the alarm clock interrupt,the alarm clock just rang once. What prevented the alarm from going off?How to avoid this situation?

@jdduke
Copy link

jdduke commented Mar 27, 2018

Just to be clear, you're saying that the issue is the alarm only ringing once? And that the alarm should continue to ring indefinitely while in VR?

@ruansf
Copy link
Author

ruansf commented Mar 28, 2018

`- (void)handleInterruption:(NSNotification *)notification
{

NSDictionary *interuptionDict = notification.userInfo;
NSInteger interuptionType = [[interuptionDict valueForKey:AVAudioSessionInterruptionTypeKey] integerValue];
switch (interuptionType) {
    case AVAudioSessionInterruptionTypeBegan:
    {
        [self.gvrAudioEngine stop];
    }
        break;
        
    default:
        break;
}

}`

I meant the alarm only ringing once. I call the method stop to stop the engine when interruption happen. But the alarm clock just rang once. Is that method asynchronous?

@Performador
Copy link

I tried to repo this and noticed that all sound stop on audio interruption.

Investigating.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants