sound icon indicating copy to clipboard operation
sound copied to clipboard

feature request: channel

Open zh99998 opened this issue 6 years ago • 6 comments

it common for a game to manage sounds in multi channels, for example, BGM and SE. and may need to use batch method like volumeAll, muteAll for a channel.

image

zh99998 avatar Sep 28 '18 07:09 zh99998

Was thinking about introduce the idea of "groups" as a new feature. This would bucket a bunch of sounds to provide more convenient way to pause/resume/mute/volume sounds that are similar.

bigtimebuddy avatar Apr 23 '19 01:04 bigtimebuddy

I made a wrapper of sound instances with "tags" system right for that purpose. So i can make unique names, apply various volume modificators for one or more instances with tag, pause groups, etc. Will be great to see that kind of functionality right in the library, it's really useful.

Corginyan avatar Apr 29 '19 18:04 Corginyan

Was there any further developments with Groups? Are we able to create more than one SoundLibrary to manage groups of sound?

Thanks in advance

c-andrews avatar Feb 14 '20 11:02 c-andrews

I use tags in my audio works as well. When uploading assets, send channels to audio files.

private _sounds: { [soundId:string]: PIXI.SOUND.default.Sound & { channel: string } };
private _sfxMute: boolean; 
for(const sfx in this._sounds) {
     if(this_sounds[sfx].channel = "sfx")
         this._sounds[sfx].muted = true;
} 

bekiremretopuz avatar Jul 08 '20 12:07 bekiremretopuz

Are the groups / channels still planned or whether the idea has been dropped?

SirMaxeN avatar Oct 12 '21 14:10 SirMaxeN

I still think it's a great feature to add. I'd welcome a PR if someone feels passionate about this to add.

bigtimebuddy avatar Oct 12 '21 14:10 bigtimebuddy