//sorisdk/com.iplateia.afplib/AfpGenerator
AfpGenerator
[androidJvm]
class AfpGenerator(listener: AfpGeneratorListener?)
AfpGenerator is responsible for handling audio recording from the microphone, and generating AFP (Audio Fingerprint) data.
This class manages the lifecycle of audio recording, including starting and stopping the recording process, buffering audio data, detecting silence, and invoking callbacks to notify listeners of recording events and AFP generation results.
Constructors
| AfpGenerator | [androidJvm] constructor(listener: AfpGeneratorListener?) |
Types
| Name | Summary |
|---|---|
| Companion | [androidJvm] object Companion |
| MicAcquireFailedException | [androidJvm] class MicAcquireFailedException : IOException Exception for microphone acquisition failure. |
Functions
| Name | Summary |
|---|---|
| setAudioParams | [androidJvm] fun setAudioParams(rate: Int, nchannels: Int, nsamplebytes: Int) Sets audio parameters for recording. |
| setRecordingDuration | [androidJvm] fun setRecordingDuration(sec: Double) Sets the recording duration in seconds. |
| setRecordingInterval | [androidJvm] fun setRecordingInterval(sec: Double) Sets the recording interval in seconds. |
| setSilenceRate | [androidJvm] fun setSilenceRate(sr: Double) Sets the silence rate threshold. |
| setSilenceThreshold | [androidJvm] fun setSilenceThreshold(st: Double) Sets the silence threshold value. |
| startGen | [androidJvm] fun startGen() Starts AFP generation from the microphone. |
| stopGen | [androidJvm] fun stopGen() Stops AFP generation and releases resources. |
