int OpenSLMediaPlayerVisualizerJNIBinder::unbind(const android::sp<OpenSLMediaPlayerVisualizer> &visualizer) noexcept
{
    if (!visualizer.get())
        return OSLMP_RESULT_ILLEGAL_ARGUMENT;

    return visualizer->setInternalPeriodicCaptureThreadEventListener(nullptr, 0, false, false);
}
int OpenSLMediaPlayerHQVisualizerJNIBinder::bind(const android::sp<OpenSLMediaPlayerHQVisualizer> &visualizer,
                                                 uint32_t rate, bool waveform, bool fft) noexcept
{

    if (!visualizer.get())
        return OSLMP_RESULT_ILLEGAL_ARGUMENT;

    return visualizer->setInternalPeriodicCaptureThreadEventListener(this, rate, waveform, fft);
}