public void SetSoundVolume(float volume, ISound music, ISound video)
{
var sounds = sourcePool.Keys.Where(key =>
{
int state;
AL10.alGetSourcei(key, AL10.AL_SOURCE_STATE, out state);
return (state == AL10.AL_PLAYING || state == AL10.AL_PAUSED) &&
(music == null || key != ((OpenAlSound)music).Source) &&
(video == null || key != ((OpenAlSound)video).Source);
});
foreach (var s in sounds)
AL10.alSourcef(s, AL10.AL_GAIN, volume);
}