~zanneth/StreamPlayer

b24ef38fbf1260af48b4344945c9d83572132e05 — Charles Magahern 7 years ago 031a8be
Delegate callback for error conditions
2 files changed, 5 insertions(+), 0 deletions(-)

M StreamPlayer/Source/ZANStreamPlayer.h
M StreamPlayer/Source/ZANStreamPlayer.m
M StreamPlayer/Source/ZANStreamPlayer.h => StreamPlayer/Source/ZANStreamPlayer.h +1 -0
@@ 16,6 16,7 @@ NS_ASSUME_NONNULL_BEGIN
@optional

- (void)streamPlayerPlaybackStateDidChange:(ZANStreamPlayer *)player;
- (void)streamPlayer:(ZANStreamPlayer *)player didEncounterError:(NSError *)error;

@end


M StreamPlayer/Source/ZANStreamPlayer.m => StreamPlayer/Source/ZANStreamPlayer.m +4 -0
@@ 591,6 591,10 @@ static void _ZANAudioQueueOutputCallback(void *clientData,
- (void)_handleError:(NSError *)error
{
    [self _logError:@"%@", error];
    
    if ([_delegate respondsToSelector:@selector(streamPlayer:didEncounterError:)]) {
        [_delegate streamPlayer:self didEncounterError:error];
    }
}

- (void)_logMessage:(NSString *)format, ...