Ejemplo n.º 1
0
 public void StopVideo()
 {
     if (video != null)
     {
         soundEngine.StopSound(video);
         videoSource.Dispose();
         videoSource = null;
         video       = null;
     }
 }
Ejemplo n.º 2
0
        private void OnSoundStopped(ISound sound, StopEventCause reason, object userData)
        {
            if (_soundSource != null)
            {
                _soundSource.Dispose();
            }
            _soundSource = null;

            //this dispose is here because sometimes sounds (over 4 seconds) were getting left in a locked state
            //but this didn't actually help.
            ((IrrKlang.ISoundEngine)userData).Dispose();


            var handler = PlaybackStopped;

            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }
Ejemplo n.º 3
0
        // 3D Sound stuff only

        /*public void ProcessSound(Vector3 sourcePosition)
         * {
         *  if (Sound != null && !Sound.Finished)
         *  {
         *      Sound.MaxDistance = MaximumDistance;
         *      Sound.MinDistance = MinimumDistance;
         *      Vector3D sourcePos = SoundHelperIK.Vector3ToVector3D(GameplayCamera.GetOffsetFromWorldCoords(sourcePosition));
         *      Sound.Position = sourcePos;
         *  }
         * }
         *
         * public void SetDistances(float max, float min)
         * {
         *  MaximumDistance = max;
         *  MinimumDistance = min;
         * }*/

        public void Dispose()
        {
            Sound.Stop();
            Sound.Dispose();
            Source.Dispose();
        }