TarsosDSP icon indicating copy to clipboard operation
TarsosDSP copied to clipboard

dispatcher.stop() from handlePitch

Open Charles808 opened this issue 7 years ago • 1 comments

Hi !

I want to know how to call the dispatcher.stop() from handlePitch function of PitchPrediction.

My idea is to release using the dispatcher, because the MIC will be used for another function, as soon as the Pitch has passed some limits.

I able to call the dispatcher.stop() from button @OnClick function.

But It won't work insisde the handlePitch.

This is the error : java.lang.IllegalStateException: stop() called on an uninitialized AudioRecord. be.tarsos.dsp.AudioDispatcher.stop(Unknown Source)

Any suggestion about this ? Note : I developed it in Android

Thank you. Warm regards.

Charles808 avatar Mar 14 '17 08:03 Charles808

I came across the same problem. This patch solved the problem for me.

TarsosDSP-Android-2.4.patch.txt

koendv avatar Jan 18 '18 18:01 koendv