Ejemplo n.º 1
0
        public override void Dispose()
        {
            if (sound != default)
            {
                sound.Dispose();
            }

            mainGroup?.Dispose();

            if (reverbUnit != default && reverbGroup != null)
            {
                reverbGroup.RemoveDSP(reverbUnit);
                reverbGroup.Dispose();
                reverbUnit.Dispose();
            }
            else
            {
                if (reverbGroup != null)
                {
                    reverbGroup.Dispose();
                }

                if (reverbUnit != default)
                {
                    reverbUnit.Dispose();
                }
            }

            base.Dispose();
        }
Ejemplo n.º 2
0
        public override void Dispose()
        {
            foreach (var sound in sounds)
            {
                if (sound != default)
                {
                    sound.Dispose();
                }
            }

            channelGroup?.Dispose();

            base.Dispose();
        }
Ejemplo n.º 3
0
 public void TestDisposeChannelGroup()
 {
     _channelGroup.Dispose();
     Assert.ThrowsException <ObjectDisposedException>(() => _channelGroup.SetEnabled(true));
 }