NoiseProbe
Samples the noise level from the microphone and reports it as Noise data.
Used for the MediaSamplingPackage.NOISE measure. Does not record sound. It listens for the duration of each sampling window and reports the mean, standard deviation, min and max decibel of that window. Configure the interval and window duration with a PeriodicSamplingConfiguration.
No measurement is added if no finite readings were collected in a window.
- Inheritance
Constructors
NoiseProbe
Properties
bufferingStream
The stream of events to be buffered. Must be specified by sub-classes.
Methods
getMeasurement
Subclasses should implement / override this method to collect the Measurement. This method will be called every time data has been buffered for a duration and should return the final measurement for the buffered data.
Can return null if no data is available. Can return an Error if an error occurs.
onSamplingData
- dynamic event
Handler for handling onData events from the buffering stream.
onSamplingEnd
Handler called when sampling period ends.
onSamplingStart
Handler called when sampling period starts.