Skip to content
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

Double disable of sound production #129

Open
jbphet opened this issue Nov 26, 2020 · 0 comments
Open

Double disable of sound production #129

jbphet opened this issue Nov 26, 2020 · 0 comments
Assignees

Comments

@jbphet
Copy link
Contributor

jbphet commented Nov 26, 2020

In soundManager.addSoundGenerator there is a bit of code that adds an enable control property to each sound generator that is added. It looks like this:

    // add the global enable Property to the list of Properties that enable this sound generator
    soundGenerator.addEnableControlProperty( this.enabledProperty );

If I remember correctly, we did this so that we wouldn't end up in a situation where the user enabled sound part-way through the production of a sound and just heard the tail end of it, or at least that we had full control over this situation. However, I believe that this is contributing to a problem where we hear some crackling when sound is disabled and then re-enabled because there are a bunch of sound generators that are being turned up at the same time as the master gain control. When I removed the above line of code, this problem seemed to go away. Note that I say "seemed to go away" because it's not particularly easy to reproduce, and I'd like to have QA test it before I'd be truly confident.

I think this is contributing to phetsims/faradays-law#192, and I feel like I need to talk this over with the rest of the sound design team before moving any further on it. If we do move forward, I feel like the first step would be for me to produce a dev version with this fix in place, have QA test it and verify that the behavior is better. If it is, I should submit the change permanently and then have QA test the existing sims that have sound and verify that nothing has broken as a result.

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

No branches or pull requests

1 participant