SKMicrophoneData

Objective-C

@interface SKMicrophoneData : SKSensorData

Swift

class SKMicrophoneData : SKSensorData

An instance of SKMicrophoneData encapsulates measurements related to the Microphone sensor. Since Microphone sensor records audio from the environment directly into the device’s memory, an SKSensorData object represent a change in the state of the Microphone sensor (e.g. Started or Stopped).

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSensorType:(SKSensorType)sensorType
                                     timestamp:
                                         (nonnull SKSensorTimestamp *)timestamp;
  • Returns an SKMicrophoneData object, initialized with the current state of the sensor and the timestamp.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithState:(nonnull NSString *)state
                             timeInterval:(NSTimeInterval)timeInterval;

    Swift

    init(state: String, timeInterval: TimeInterval)

    Parameters

    state

    Microphone sensor state.

    timeInterval

    Time that the state of the sensor changed.

    Return Value

    An SKMicrophoneData object.

  • A string with the state of Microphone sensor (e.g. Started or Stopped).

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull state;

    Swift

    var state: String { get }
  • A string with a CSV formatted header that describes the data of the Microphone sensor. This method is useful in combination with the csvString instance method of an SKSensorData object.

    Declaration

    Objective-C

    + (nonnull NSString *)csvHeader;

    Swift

    class func csvHeader() -> String

    Return Value

    A string with a CSV header.