TarsosDSP
TarsosDSP copied to clipboard
dispatcher.stop() from handlePitch
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.
I came across the same problem. This patch solved the problem for me.