Open HelgeStenstrom opened 5 years ago
This is more of a bug report than a real pull request. The PR has one test, and the test doesn't end quickly as tests should, so it's useless as a unit test. But it might be good for illustrating a problem.
Reset never returns because (audiolock) is already locked by call method when the sound is playing, so it stuck on synchronized(audiolock) until the sound stops or pauses and the lock is getting free. One thing could be that reset internally calls stop first but actually we can make reset private if it's not needed.
Should i merge this :)?
No, that wasn't the intention. It's more of documentation for the bug report.
Good
I need to redesign then
reset() is a public method. If it's called when the player is playing, it seems to not return. I cannot really see what is executing when I run the test in the debugger.
The test print "play()", and goes on to play the song. It never prints "reset()"
Expected behavior: The player is stopped so quickly, that no music is heard. Maxium one frame of sound samples. The word "reset() should be printed after "play()".
What can be learnt from this behavior?