SFBAudioProperties


@interface SFBAudioProperties : NSObject <NSCopying>

Class providing information on basic audio properties

  • Returns an initialized an \c SFBAudioProperties object

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Returns an initialized an \c SFBAudioProperties object populated with values from \c dictionaryRepresentation

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDictionaryRepresentation:
        (nonnull NSDictionary<SFBAudioPropertiesKey, id> *)dictionaryRepresentation;

    Parameters

    dictionaryRepresentation

    A dictionary containing the desired values

  • The name of the audio format

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *formatName;
  • The total number of audio frames

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *frameLength;
  • The number of channels

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *channelCount;
  • The number of bits per channel

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *bitsPerChannel;
  • The sample rate in Hz

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *sampleRate;
  • The duration in seconds

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *duration;
  • The audio bitrate in KiB/sec

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *bitrate;

External Representation

Dictionary-Like Interface

  • Returns the property value for a key

    Declaration

    Objective-C

    - (nullable id)objectForKey:(nonnull SFBAudioPropertiesKey)key;

    Parameters

    key

    The key for the desired property value

    Return Value

    The property value for \c key

  • Returns the property value for a key

    Declaration

    Objective-C

    - (nullable id)valueForKey:(nonnull SFBAudioPropertiesKey)key;

    Parameters

    key

    The key for the desired property value

    Return Value

    The property value for \c key

  • Returns the property value for a key

    Declaration

    Objective-C

    - (nullable id)objectForKeyedSubscript:(nonnull SFBAudioPropertiesKey)key;

    Parameters

    key

    The key for the desired property value

    Return Value

    The property value for \c key

  • The total number of audio frames

    Declaration

    Swift

    public var frameLength: AVAudioFramePosition? { get }
  • The number of channels

    Declaration

    Swift

    public var channelCount: AVAudioChannelCount? { get }
  • The number of bits per channel

    Declaration

    Swift

    public var bitsPerChannel: Int? { get }
  • The sample rate in Hz

    Declaration

    Swift

    public var sampleRate: Double? { get }
  • The duration in seconds

    Declaration

    Swift

    public var duration: TimeInterval? { get }
  • The audio bitrate in KiB/sec

    Declaration

    Swift

    public var bitrate: Double? { get }