AudioProbe
Records audio from the microphone to a file.
Used for the MediaSamplingPackage.AUDIO measure. Recording starts on onResume and stops on onPause. On stop, the probe adds an AudioMedia measurement to the measurements stream.
Key points:
- Only one recording can run at a time.
- Records raw sound, including any human speech nearby, and produces a lot of data. Use with caution.
- The sound file is stored as AAC in an
.mp4file in the MediaSamplingPackage.MEDIA_FILES_PATH folder, named by the MediaData.id. - The AudioMedia data holds the metadata and file name. How the file is uploaded is up to the DataManager used in the deployment.
- Inheritance
-
- Object
- AbstractExecutor<
Measure> - Probe
- AudioProbe
Constructors
AudioProbe
Properties
isRecording
Whether a recording is in progress.
Methods
onDispose
Callback when this executor is disposed.
Subclasses should override this, to implement any cleanup to be done before disposing.
onInitialize
Callback when this executor is initialized. Returns true if successfully initialized, false otherwise.
Note that this is a non-async method and should hence be 'light-weight' and not block execution for a long duration.
onPause
Callback when this executor is paused. Returns true if successfully paused, false otherwise.
onResume
Callback when this executor is resumed. Returns true if successfully resumed, false otherwise.