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

NumberControl does not accept custom soundGenerators #802

Closed
AgustinVallejo opened this issue Mar 21, 2023 · 2 comments
Closed

NumberControl does not accept custom soundGenerators #802

AgustinVallejo opened this issue Mar 21, 2023 · 2 comments
Assignees

Comments

@AgustinVallejo
Copy link
Contributor

While working on phetsims/my-solar-system#105 we got into a problem of providing a custom sound generator. We got around this problem by commenting this assertion https://github.com/phetsims/sun/blob/b1a5196fb47c148959375fd6fb8a3f1c3a732b6a/js/Slider.ts#L227-L228

'options should only be supplied when using default sound generator'

What should be done about this?

@AgustinVallejo
Copy link
Contributor Author

@jbphet Could you comment on this workaround?

@jbphet
Copy link
Contributor

jbphet commented Mar 22, 2023

That doesn't seem like quite the right approach to me. The idea in the code is that you can use the default sound generator and provide options to it, or you can provide a custom sound generator. You shouldn't need to do both.

If you're trying to provide both a custom sound generator and options for it, why not just supply the options to the custom sound generator where it's created?

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

2 participants