AVAudioFile

class AVAudioFile : NSObject
  • The number of samples can be accessed by .length property, but samplesCount has a less ambiguous meaning

    Declaration

    Swift

    open var samplesCount: Int64
  • strange that sampleRate is a Double and not an Integer

    Declaration

    Swift

    open var sampleRate: Double
  • Number of channels, 1 for mono, 2 for stereo

    Declaration

    Swift

    open var channelCount: UInt32
  • Duration in seconds

    Declaration

    Swift

    open var duration: Double
  • true if Audio Samples are interleaved

    Declaration

    Swift

    open var interleaved: Bool
  • true only if file format is deinterleaved native-endian float (AVAudioPCMFormatFloat32)

    Declaration

    Swift

    open var standard: Bool
  • Human-readable version of common format

    Declaration

    Swift

    open var commonFormatString: String
  • the directory path as a URL object

    Declaration

    Swift

    open var directoryPath: URL
  • the file name with extension as a String

    Declaration

    Swift

    open var fileNamePlusExtension: String
  • the file name without extension as a String

    Declaration

    Swift

    open var fileName: String
  • the file extension as a String (without .)

    Declaration

    Swift

    open var fileExt: String
  • Undocumented

    Declaration

    Swift

    class AVAudioFile : NSObject
  • returns file Mime Type if exists Otherwise, returns nil (useful when sending an AKAudioFile by email)

    Declaration

    Swift

    public var mimeType: String?
  • Static function to delete all audiofiles from Temp directory

    AKAudioFile.cleanTempDirectory()

    Declaration

    Swift

    public static func cleanTempDirectory()