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

Should categoryName be required when adding a SoundGenerator? #158

Open
pixelzoom opened this issue Nov 16, 2021 · 2 comments
Open

Should categoryName be required when adding a SoundGenerator? #158

pixelzoom opened this issue Nov 16, 2021 · 2 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

soundManager supports putting sounds into named "catagories". But when a SoundGenerator is added, specifying a catagory is optional, via option catagoryName. For example:

soundManager.addSoundGenerator( goBackSoundClip, { categoryName: 'user-interface' } );

Because categoryName is optional, this can lead to oversights like phetsims/vegas#98.

Should categoryName be required? Should it default to something that is not null, so that all sounds get put in some "default" category? Is there a reason why every SoundGenerator should NOT be in a category?

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Nov 16, 2021

Here's the current state of addSoundGenerator calls. There are zero uses of categoryName in sims, and common code is using it inconsistently. This seems like a good argument for making categoryName required, and standardizing on some categories other that 'ui-sounds'.

sim calls to addSoundGenerator use of categoryName
balloons-and-static-electricity 8 0
circuilt-construction-kit-common 1 0
faradays-law 9 0
fourier-making-waves 1 0
friction 9 0
gravity-force-lab-basics 5 0
gravity-force-lab 5 0
greenhouse-effect 19 0
inverse-square-law-common 3 0
john-travoltage 7 0
molarity 3 0
ohms-law 3 0
quadrilateral 3 0
ratio-and-proportion 8 0
resistance-in-a-wire 1 0
wave-interference 8 0
common repo calls to addSoundGenerator use of categoryName
joist 2 2
scenery-phet 1 1
tambo 1 1
vegas 6 1

@jbphet
Copy link
Contributor

jbphet commented Nov 18, 2021

We discussed this in today's design team meeting and decided to add the GameAudioPlayer sounds into a category, and have sounds for which no category is specified go into a default category. I will do that work.

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