Re: Changing listener gain but don't affect some sources
Eric Wing <[email protected]>
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
> But if we want to change volume of all SFX, we change gain of listener, > which one is too affecting music sources (that's the problem). > > I tried to create 2 contexts : one for SFX and one for music (so a > listener won't affect other), but it doesn't work, second context creation > returns NULL. Even if second context creation worked for you, I have a suspicion that the way it behaves will be implementation specific and you might still not be happy if you care about cross-platform. I haven't verified this, but I suspect that on iOS for example, the moment you change contexts, the swapped out context may get disabled so you can't hear it any more. (This is because you are expected to make the current context NULL to effectively disable it when an interruption event like a phone call comes in.) This would be bad for background music. > I thought about changing gain of all SFX sources, but I have to implement > a local and global gain for each of them. > > Do you know if there could exist an alternative method to achieve that ? > > Could we specify some sources not to be affected by listener gain ? Personally, I don't know of any other way of doing this. I think you will have to do it manually. Maybe somebody else knows of an extension. -Eric _______________________________________________ Openal mailing list [email protected] http://opensource.creative.com/mailman/listinfo/openal