SFBDSDDecoding

@protocol SFBDSDDecoding <SFBAudioDecoding>

Protocol defining the interface for audio encoders producing DSD audio

Position and Length Information

  • Returns the decoder’s current packet position or \c SFBUnknownPacketPosition if unknown

    Declaration

    Objective-C

    @property (nonatomic, readonly) AVAudioFramePosition packetPosition;
  • Returns the decoder’s length in packets or \c SFBUnknownPacketCount if unknown

    Declaration

    Objective-C

    @property (nonatomic, readonly) AVAudioFramePosition packetCount;

Decoding

  • Decodes audio

    Declaration

    Objective-C

    - (BOOL)decodeIntoBuffer:(nonnull AVAudioCompressedBuffer *)buffer
                 packetCount:(AVAudioPacketCount)packetCount
                       error:(NSError *_Nullable *_Nullable)error;

    Parameters

    buffer

    A buffer to receive the decoded audio

    packetCount

    The desired number of audio packets

    error

    An optional pointer to an \c NSError object to receive error information

    Return Value

    \c YES on success, \c NO otherwise

Seeking

  • Returns \c YES if the decoder is seekable

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL supportsSeeking;
  • Seeks to the specified packet

    Declaration

    Objective-C

    - (BOOL)seekToPacket:(AVAudioFramePosition)packet
                   error:(NSError *_Nullable *_Nullable)error;

    Parameters

    packet

    The desired packet

    error

    An optional pointer to an \c NSError object to receive error information

    Return Value

    \c YES on success, \c NO otherwise