Esempio n. 1
0
        static SoundChannel ConfigureClip(
            SoundClip clip,
            int maxLoops,
            float volume,
            float pitch,
            float lowPass)
        {
            if (clip != null)
            {
                var channel = clip.Play(true);
                AssignChannel(channel);

                channel.MaxLoops = maxLoops;
                channel.Volume   = volume;
                channel.Volume  *= _volume;
                channel.Pitch    = pitch;
                channel.LowPass  = lowPass;
                channel.Resume();

                return(channel);
            }

            return(null);
        }