Test with reset() behaves oddly#39
Open
HelgeStenstrom wants to merge 34 commits intogoxr3plus:masterfrom
Open
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?
Collaborator
Author
|
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.
Owner
|
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
Owner
|
Should i merge this :)? |
Collaborator
Author
|
No, that wasn't the intention. It's more of documentation for the bug report. |
Owner
|
Good |
Owner
|
I need to redesign then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?