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

Remove the close queue #193

Merged
merged 2 commits into from Dec 9, 2018

Conversation

Projects
None yet
2 participants
@TheRamenChef
Copy link
Collaborator

TheRamenChef commented Dec 1, 2018

Since this didn't get any attention as an issue, I'm opening this as a pull request.

I'm not sure if the close queue is strictly necessary, but removing it allows more immediate results on a call to the SoundPlayback.cancel method. It seems to be there for performance reasons, but recording the actual time it takes for each sound indicates that it takes less then 0.05 milliseconds.

This pull request also makes the dispose method private and only callable through the cancel method. (the data line is still closed if it finishes normally)

Closes #188, even if unmerged.

@steffen-wilke steffen-wilke self-requested a review Dec 2, 2018

@steffen-wilke

This comment has been minimized.

Copy link
Collaborator

steffen-wilke commented Dec 8, 2018

I'm going to test this PR this weekend. Honestly, I don't fully remember the exact reasons for the close queue and it could even be that it can be removed without any side effects.

@steffen-wilke
Copy link
Collaborator

steffen-wilke left a comment

Just did a test of this rework and it doesn't seem to cause any issue.

@steffen-wilke steffen-wilke merged commit 8265f27 into master Dec 9, 2018

4 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@steffen-wilke steffen-wilke deleted the remove-close-queue branch Dec 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment