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
audioPlayerNodeThe \c SFBAudioPlayerNode object processing \c decoder
decoderThe 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
audioPlayerNodeThe \c SFBAudioPlayerNode object processing \c decoder
decoderThe 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
audioPlayerNodeThe \c SFBAudioPlayerNode object processing \c decoder
decoderThe 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
audioPlayerNodeThe \c SFBAudioPlayerNode object processing \c decoder
decoderThe decoder for which rendering is about to start
hostTimeThe 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
audioPlayerNodeThe \c SFBAudioPlayerNode object processing decoder
decoderThe 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
audioPlayerNodeThe \c SFBAudioPlayerNode object processing \c decoder
decoderThe 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
audioPlayerNodeThe \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
audioPlayerNodeThe \c SFBAudioPlayerNode object
errorThe error
View on GitHub
SFBAudioPlayerNodeDelegate Protocol Reference