Skip to content

//sorisdk/com.iplateia.afplib/AfpMatcher

AfpMatcher

class AfpMatcher(service: Service, handler: Handler)

AfpMatcher is a class that handles audio fingerprint matching. It uses the AfpGenerator to generate audio fingerprints and matches them against an AudioDB. It also manages the state of the matching process and handles errors.

The handler should be implemented to process messages from the AfpMatcher.

Parameters

androidJvm

serviceThe service context.
handlerThe handler to process messages.

Constructors

AfpMatcher[androidJvm]
constructor(service: Service, handler: Handler)
Creates an instance of AfpMatcher.

Types

NameSummary
Companion[androidJvm]
object Companion

Properties

NameSummary
running[androidJvm]
var running: Boolean

Functions

NameSummary
clearState[androidJvm]
fun clearState()
Clear match state. This will reset the queued matches and last per type.
getAudioDB[androidJvm]
fun getAudioDB(): AudioDB
Get current AudioDB instance. It's same as directly accessing the audioDB property.
loadAudioPack[androidJvm]
@Synchronized
fun loadAudioPack(bis: BufferedInputStream)
Load audio pack from BufferedInputStream.
[androidJvm]
@Synchronized
fun loadAudioPack(path: String)
Load audio pack from filesystem.
setAudioDB[androidJvm]
fun setAudioDB(adb: AudioDB?)
Set AudioDB instance. Replacing the AudioDB while the AfpMatcher is running may cause issues.
setAudioParams[androidJvm]
fun setAudioParams(rate: Int, nchannels: Int, nsamplebytes: Int)
Set audio parameters for generator.
startCapture[androidJvm]
fun startCapture()
Start audio capture mode.
stopCapture[androidJvm]
fun stopCapture()
Stop audio capture mode.