This library is 10 years old, I can't immediately find the source code for it (probably have it backed up somewhere). Feel free to inspect it with jd-gui or similar.
I don't think you should be using the sleep command in a thread, it will not do anything useful and If I remember correctly the subsequent restart will be on the main thread.
I don't remember issues with logging from a thread, but you could try the thread RunOnGuiThread method call to delegate to a different method and Log from there if it is an issue for you, although this would probably then be delayed.
If I were to write this library now, I would use JavaObject in a B4xlib, again from memory, there is very little processing in the library and mainly just calls the java AudioTrack methods.