SFBPCMDecoding
@protocol SFBPCMDecoding <SFBAudioDecoding>
Protocol defining the interface for audio decoders producing PCM audio
-
Returns the decoder’s current frame position or \c SFBUnknownFramePosition if unknown
Declaration
Objective-C
@property (nonatomic, readonly) AVAudioFramePosition framePosition; -
Returns the decoder’s length in frames or \c SFBUnknownFrameLength if unknown
Declaration
Objective-C
@property (nonatomic, readonly) AVAudioFramePosition frameLength;
-
Decodes audio
Declaration
Objective-C
- (BOOL)decodeIntoBuffer:(nonnull AVAudioPCMBuffer *)buffer frameLength:(AVAudioFrameCount)frameLength error:(NSError *_Nullable *_Nullable)error;Parameters
bufferA buffer to receive the decoded audio
frameLengthThe desired number of audio frames
errorAn optional pointer to an \c NSError object to receive error information
Return Value
\c YES on success, \c NO otherwise
-
Seeks to the specified frame
Declaration
Objective-C
- (BOOL)seekToFrame:(AVAudioFramePosition)frame error:(NSError *_Nullable *_Nullable)error;Parameters
frameThe desired frame
errorAn optional pointer to an \c NSError object to receive error information
Return Value
\c YES on success, \c NO otherwise
View on GitHub
SFBPCMDecoding Protocol Reference