Skip to content

Initialize tones with a dedicated initialize method#10573

Merged
michaelDCurran merged 3 commits into
nvaccess:masterfrom
LeonarddeR:tonesInit
Dec 5, 2019
Merged

Initialize tones with a dedicated initialize method#10573
michaelDCurran merged 3 commits into
nvaccess:masterfrom
LeonarddeR:tonesInit

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Dec 3, 2019

Copy link
Copy Markdown
Collaborator

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:

@AppVeyorBot

Copy link
Copy Markdown

PR introduces Flake8 errors 😲

See test results for Failed build of commit 14bf331c64

@michaelDCurran michaelDCurran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tones should also be terminated and re-initialized in core.resetConfiguration.

@LeonarddeR

Copy link
Copy Markdown
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.

@dpy013

dpy013 commented Dec 5, 2019

Copy link
Copy Markdown
Contributor

hi @LeonarddeR
appveyor The following prompt appears
Checking for ability to merge automatically…
Hang in there while we check the branch’s status.
thanks

@michaelDCurran
michaelDCurran merged commit 540f3ee into nvaccess:master Dec 5, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Dec 5, 2019
michaelDCurran added a commit that referenced this pull request Dec 5, 2019
@LeonarddeR
LeonarddeR deleted the tonesInit branch August 23, 2025 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When audio output device is changed beeps are still beeing played in the previous device

5 participants