SFBAudioPlayerNodeDelegate
@protocol SFBAudioPlayerNodeDelegate <NSObject>
Delegate methods supported by \c SFBAudioPlayerNode
-
Called to notify the delegate before decoding the first frame of audio
Warning
Do not change any properties of \c decoderDeclaration
Objective-C
- (void)audioPlayerNode:(nonnull SFBAudioPlayerNode *)audioPlayerNode decodingStarted:(nonnull id<SFBPCMDecoding>)decoder;
Parameters
audioPlayerNode
The \c SFBAudioPlayerNode object processing \c decoder
decoder
The decoder for which decoding started
-
Called to notify the delegate after decoding the final frame of audio
Warning
Do not change any properties of \c decoderDeclaration
Objective-C
- (void)audioPlayerNode:(nonnull SFBAudioPlayerNode *)audioPlayerNode decodingComplete:(nonnull id<SFBPCMDecoding>)decoder;
Parameters
audioPlayerNode
The \c SFBAudioPlayerNode object processing \c decoder
decoder
The decoder for which decoding is complete
-
Called to notify the delegate that decoding has been canceled
Warning
Do not change any properties of \c decoderDeclaration
Objective-C
- (void)audioPlayerNode:(nonnull SFBAudioPlayerNode *)audioPlayerNode decodingCanceled:(nonnull id<SFBPCMDecoding>)decoder partiallyRendered:(BOOL)partiallyRendered;
Parameters
audioPlayerNode
The \c SFBAudioPlayerNode object processing \c decoder
decoder
The decoder for which decoding is canceled
partiallyRendered
\c YES if any audio frames from \c decoder were rendered
-
Called to notify the delegate that audio will soon begin rendering
Warning
Do not change any properties of \c decoderDeclaration
Objective-C
- (void)audioPlayerNode:(nonnull SFBAudioPlayerNode *)audioPlayerNode renderingWillStart:(nonnull id<SFBPCMDecoding>)decoder atHostTime:(uint64_t)hostTime;
Parameters
audioPlayerNode
The \c SFBAudioPlayerNode object processing \c decoder
decoder
The decoder for which rendering is about to start
hostTime
The host time at which the first audio frame from \c decoder will reach the device
-
Called to notify the delegate when rendering the first frame of audio
Warning
Do not change any properties of \c decoderDeclaration
Objective-C
- (void)audioPlayerNode:(nonnull SFBAudioPlayerNode *)audioPlayerNode renderingStarted:(nonnull id<SFBPCMDecoding>)decoder;
Parameters
audioPlayerNode
The \c SFBAudioPlayerNode object processing decoder
decoder
The decoder for which rendering started
-
Called to notify the delegate when rendering the final frame of audio
Warning
Do not change any properties of \c decoderDeclaration
Objective-C
- (void)audioPlayerNode:(nonnull SFBAudioPlayerNode *)audioPlayerNode renderingComplete:(nonnull id<SFBPCMDecoding>)decoder;
Parameters
audioPlayerNode
The \c SFBAudioPlayerNode object processing \c decoder
decoder
The decoder for which rendering is complete
-
Called to notify the delegate when rendering is complete for all available decoders
Declaration
Objective-C
- (void)audioPlayerNodeEndOfAudio:(nonnull SFBAudioPlayerNode *)audioPlayerNode;
Parameters
audioPlayerNode
The \c SFBAudioPlayerNode object
-
Called to notify the delegate when an asynchronous error occurs
Declaration
Objective-C
- (void)audioPlayerNode:(nonnull SFBAudioPlayerNode *)audioPlayerNode encounteredError:(nonnull NSError *)error;
Parameters
audioPlayerNode
The \c SFBAudioPlayerNode object
error
The error