AVAudioSession endInterruption() returns an NSOSStatusErrorDomain

后端 未结 4 1430
眼角桃花
眼角桃花 2021-01-21 10:16

I\'m trying to solve an AVAudioSession problem since many hours ago and didn\'t get success!!

I found lots of guys talking about problems with endInterruption but none o

4条回答
  •  天命终不由人
    2021-01-21 10:56

    I solved the problem changing the way to design my audio code. Instead of use AVAudioSession and its delegate methods, I change to the C style to work with audio.

    I implemented the function:

    void interruptionListenerCallback (void *inUserData, UInt32 interruptionState) {}
    

    And it was initialized with:

    AudioSessionInitialize (NULL, NULL, interruptionListenerCallback, self);
    

    inside my -(id) init method.

    Hope it helps you also. Best.

提交回复
热议问题