-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test with reset() behaves oddly #39
base: master
Are you sure you want to change the base?
Conversation
Minor comment fixes
Alphabetically sorted methods
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?
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. |
This reverts commit 409bf9b.
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. |
Also extracted flushAndStopOutlet, but it's not tested yet, so it will be moved when it's tested.
Test that paueses, to exercise flushAndStopOutlet()
…treamPlayer Extract class from stream player
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?
…java-stream-player into resetWhenPlaying
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?