You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling AudioDispatcher.stop() from another thread causes the dispatch audioLoop to hang instead of exit. There is some concurrency issue in there. waiting for the audioLoop to finish before calling AudioDispatcher.stop() seems to be a hack that works but you may need to solve the root cause. (also variables such as 'stopped' that are used as access control between threads should be declared volatile).
Also, just doing a local 'break' instead of 'break audioLoop' in the AudioDispatcher allows you prevent the processor chain from continuing to run without actually stopping the whole process - which you should use stop() for. I found this useful for creating control gates (which return false) that prevent further processing until some threshold etc. has been achieved.
The text was updated successfully, but these errors were encountered:
I am working on a better implementation of the AudioDispatcher. It is indeed a bit hacky right now. It contains bugs for the first and last audio buffer, these are very apparent when large buffers are used. There are fixes in the experimental package:
While ironing out the bugs I'm also rethinking the pipeline. Now it has problems when audio buffers change size while processing (e.g. resampling or time stretching).
Calling AudioDispatcher.stop() from another thread causes the dispatch audioLoop to hang instead of exit. There is some concurrency issue in there. waiting for the audioLoop to finish before calling AudioDispatcher.stop() seems to be a hack that works but you may need to solve the root cause. (also variables such as 'stopped' that are used as access control between threads should be declared volatile).
Also, just doing a local 'break' instead of 'break audioLoop' in the AudioDispatcher allows you prevent the processor chain from continuing to run without actually stopping the whole process - which you should use stop() for. I found this useful for creating control gates (which return false) that prevent further processing until some threshold etc. has been achieved.
The text was updated successfully, but these errors were encountered: