Initialize tones with a dedicated initialize method#10573
Merged
michaelDCurran merged 3 commits intonvaccess:masterfrom Dec 5, 2019
Merged
Initialize tones with a dedicated initialize method#10573michaelDCurran merged 3 commits intonvaccess:masterfrom
michaelDCurran merged 3 commits intonvaccess:masterfrom
Conversation
|
PR introduces Flake8 errors 😲 See test results for Failed build of commit 14bf331c64 |
michaelDCurran
requested changes
Dec 4, 2019
Member
michaelDCurran
left a comment
There was a problem hiding this comment.
Tones should also be terminated and re-initialized in core.resetConfiguration.
Collaborator
Author
|
I applied changes as requested and also did some reordering. Tones is now initialized after and terminated before NVDAHelper, as it relies on it. |
Contributor
|
hi @LeonarddeR |
michaelDCurran
approved these changes
Dec 5, 2019
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.
Link to issue number:
Split from #9968
Fixes #2167
Summary of the issue:
The tones module initializes at the module level, importing the module triggers initialization. This causes sphinx to spit warnings about it not being able to initialize tones. Theoretically while unit testing, this is also the case because the tones module is imported by several other modules used within the unit testing framework.
Description of how this pull request fixes the issue:
Added a initialize method to tones. Rename the cleanup method to terminate. Made sure that initialization and termination takes place in core.
This change allows us to reinitialize tones when we change the audio output device.
Testing performed:
Make sure that tones still play.
Known issues with pull request:
None known
Change log entry: