SFBAudioEncoder


@interface SFBAudioEncoder : NSObject <SFBPCMEncoding>

An encoder consuming PCM audio

File Format Support

  • Returns a set containing the supported path extensions

    Declaration

    Objective-C

    @property (class, nonatomic, readonly) NSSet<NSString *> *_Nonnull supportedPathExtensions;
  • Returns a set containing the supported MIME types

    Declaration

    Objective-C

    @property (class, nonatomic, readonly) NSSet<NSString *> *_Nonnull supportedMIMETypes;
  • Tests whether a file extension is supported

    Declaration

    Objective-C

    + (BOOL)handlesPathsWithExtension:(nonnull NSString *)extension;
  • Tests whether a MIME type is supported

    Declaration

    Objective-C

    + (BOOL)handlesMIMEType:(nonnull NSString *)mimeType;

Creation

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    + (instancetype)new NS_UNAVAILABLE;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Returns an initialized \c SFBAudioEncoder object for the given URL or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)initWithURL:(nonnull NSURL *)url;

    Parameters

    url

    The URL

    Return Value

    An initialized \c SFBAudioEncoder object for the specified URL, or \c nil on failure

  • Returns an initialized \c SFBAudioEncoder object for the given URL or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)initWithURL:(nonnull NSURL *)url
                                   error:(NSError *_Nullable *_Nullable)error;

    Parameters

    url

    The URL

    error

    An optional pointer to a \c NSError to receive error information

    Return Value

    An initialized \c SFBAudioEncoder object for the specified URL, or \c nil on failure

  • Returns an initialized \c SFBAudioEncoder object for the given URL or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)initWithURL:(nonnull NSURL *)url
                                mimeType:(nullable NSString *)mimeType
                                   error:(NSError *_Nullable *_Nullable)error;

    Parameters

    url

    The URL

    mimeType

    The MIME type of \c url or \c nil

    error

    An optional pointer to a \c NSError to receive error information

    Return Value

    An initialized \c SFBAudioEncoder object for the specified URL, or \c nil on failure

  • Returns an initialized \c SFBAudioEncoder object for the given output source or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)initWithOutputSource:
        (nonnull SFBOutputSource *)outputSource;

    Parameters

    outputSource

    The output source

    Return Value

    An initialized \c SFBAudioEncoder object for the specified output source, or \c nil on failure

  • Returns an initialized \c SFBAudioEncoder object for the given output source or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)
        initWithOutputSource:(nonnull SFBOutputSource *)outputSource
                       error:(NSError *_Nullable *_Nullable)error;

    Parameters

    outputSource

    The output source

    error

    An optional pointer to a \c NSError to receive error information

    Return Value

    An initialized \c SFBAudioEncoder object for the specified output source, or \c nil on failure

  • Returns an initialized \c SFBAudioEncoder object for the given output source or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)
        initWithOutputSource:(nonnull SFBOutputSource *)outputSource
                    mimeType:(nullable NSString *)mimeType
                       error:(NSError *_Nullable *_Nullable)error;

    Parameters

    outputSource

    The output source

    mimeType

    The MIME type of \c outputSource or \c nil

    error

    An optional pointer to a \c NSError to receive error information

    Return Value

    An initialized \c SFBAudioEncoder object for the specified output source, or \c nil on failure

  • Returns an initialized \c SFBAudioEncoder object for the given URL or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)initWithURL:(nonnull NSURL *)url
                             encoderName:(nonnull SFBAudioEncoderName)encoderName;

    Parameters

    url

    The URL

    encoderName

    The name of the encoder to use

    Return Value

    An initialized \c SFBAudioEncoder object for the specified URL, or \c nil on failure

  • Returns an initialized \c SFBAudioEncoder object for the given URL or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)initWithURL:(nonnull NSURL *)url
                             encoderName:(nonnull SFBAudioEncoderName)encoderName
                                   error:(NSError *_Nullable *_Nullable)error;

    Parameters

    url

    The URL

    encoderName

    The name of the encoder to use

    error

    An optional pointer to a \c NSError to receive error information

    Return Value

    An initialized \c SFBAudioEncoder object for the specified URL, or \c nil on failure

  • Returns an initialized \c SFBAudioEncoder object for the given output source or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)
        initWithOutputSource:(nonnull SFBOutputSource *)outputSource
                 encoderName:(nonnull SFBAudioEncoderName)encoderName;

    Parameters

    outputSource

    The output source

    encoderName

    The name of the encoder to use

    Return Value

    An initialized \c SFBAudioEncoder object for the specified output source, or \c nil on failure

  • Returns an initialized \c SFBAudioEncoder object for the given output source or \c nil on failure

    Declaration

    Objective-C

    - (nullable instancetype)
        initWithOutputSource:(nonnull SFBOutputSource *)outputSource
                 encoderName:(nonnull SFBAudioEncoderName)encoderName
                       error:(NSError *_Nullable *_Nullable)error;

    Parameters

    outputSource

    The output source

    encoderName

    The name of the encoder to use

    error

    An optional pointer to a \c NSError to receive error information

    Return Value

    An initialized \c SFBAudioEncoder object for the specified output source, or \c nil on failure

  • Opens the encoder

    Declaration

    Objective-C

    - (BOOL)openReturningError:(NSError *_Nullable *_Nullable)error;

    Parameters

    error

    An optional pointer to a \c NSError to receive error information

    Return Value

    \c YES on success, \c NO otherwise

  • Closes the encoder

    Declaration

    Objective-C

    - (BOOL)closeReturningError:(NSError *_Nullable *_Nullable)error;

    Parameters

    error

    An optional pointer to a \c NSError to receive error information

    Return Value

    \c YES on success, \c NO otherwise