-
Notifications
You must be signed in to change notification settings - Fork 67
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
Sound in new Library shares the same filters set in default library #183
Comments
This is not really intended usage to create a new SoundLibrary. Are you trying to separate UI from other audio? This feature request has come up a bunch. I suggest we add groups for doing UI, FX, music, etc. |
In my opinion a simple way to solve this is : add a private field I don't think I understand |
Groups would allow a user to add filters, set volume, mute, pause, etc a user-defined set of sounds. It's very common to do this kind of thing with games. sound.addGroup("ui", ["beep", "boop"])
sound.groupVolume("ui", 0.5)
sound.groupFilters("ui", []) |
Thank you for your explanation, but it seems another I assume Group can
Then what's the difference between I have little experience in game development, but I can't find the Group implementation in Phaser either, is there any project that did what you said? Thanks and happy new year! |
Hi @bigtimebuddy , I read the thread #74, but I still don't think introducing group for this is a good idea. A sound created by |
Hi there,
I'm creating a new
SoundLibrary
calleduiLib
, but the sounds added touiLib
are also applying the filters set to the default librarysound
. But I don't think filters set to A library should apply to B library, isn't it?But from the code
sound/src/Sound.ts
Lines 355 to 362 in a7f6706
We can see that all sounds are sharing the same audio context from the default library
sound
. Is this a bug or not?Meanwhile, it seems that I can call
setInstance
when adding sounds touiLib
, then switch it back tosound
, butsetInstance
is not exported.The text was updated successfully, but these errors were encountered: