SKMicrophoneData Class Reference

Inherits from SKSensorData : NSObject
Declared in SKMicrophoneData.h

Overview

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).

– initWithSensorType:withTimestamp:

Returns an SKSensorData object, initialized with the given SKSensorType and SKSensorTimestamp.

- (instancetype)initWithSensorType:(SKSensorType)sensorType withTimestamp:(SKSensorTimestamp *)timestamp

Parameters

sensorType

The type of the sensor that produced this data object.

timestamp

The time were this data log was captured.

Return Value

A new SKSensorData object.

Declared In

SKSensorData.h

– initWithState:withTimeInterval:

Returns an SKMicrophoneData object, initialized with the current state of the sensor and the timestamp.

- (instancetype)initWithState:(NSString *)state withTimeInterval:(NSTimeInterval)timeInterval

Parameters

state

Microphone sensor state.

timeInterval

Time that the state of the sensor changed.

Return Value

An SKMicrophoneData object.

Declared In

SKMicrophoneData.h

  state

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

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

Declared In

SKMicrophoneData.h

+ csvHeader

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.

+ (NSString *)csvHeader

Return Value

A string with a CSV header.

Declared In

SKMicrophoneData.h