objective c - iPhone: 'endInterruption' is not being called for an <AVAudioSessionDelegate> Class -
i have sound manager class implements avaudiosessiondelegate protocol, i.e. begininterruption , endinterruption methods.
however, when ring phone , go app, neither method gets called , app thereafter silent. tested using both debugger , using nslog calls.
the sound manager class uses openal.
-
my class declared so:
@interface cmopenalsoundmanager : nsobject <avaudioplayerdelegate, avaudiosessiondelegate>
and delegate implementations follows:
- (void)begininterruption { [self setactivated:no]; } - (void)audioplayerbegininterruption { [self setactivated:no]; } - (void)endinterruption { [self setactivated:yes]; } - (void)audioplayerendinterruption { [self setactivated:yes]; }
where setactivated:(bool)state contains code start , stop sound manager.
-
i can't see reason delegate methods not called - perhaps there forgetting when start sound manager or set audio properties etc?
or blatantly missing more obvious :o
any ideas appreciated!
this seems bug in ios. there various conditions in endinterruption
callback not called. i've done check whether app playing audio in applicationwillenterforeground
method (or precise: i've registered corresponding notification don't have in app delegate). can check via audiosessiongetproperty , kaudiosessionproperty_otheraudioisplaying.
Comments
Post a Comment