Exemple #1
0
 public override void Play()
 {
     wave.Volume = clip.Volume;
     if (wave.Playing)
     {
         wave.Stop();
     }
     wave.Play();
 }
Exemple #2
0
 public void Play()
 {
     if (complexSound)
     {
         foreach (XactClip clip in soundClips)
         {
             clip.Play();
         }
     }
     else
     {
         if (wave.Playing)
         {
             wave.Stop();
         }
         wave.Play();
     }
 }
        public void Dispose()
        {
#if DIRECTX
            if (_voice != null)
            {
                _voice.DestroyVoice();
                _voice.Dispose();
                _voice = null;
            }
            _effect = null;
#elif ANDROID
            if (_streamId >= 0)
            {
                _sound.Stop(_streamId);
            }
#else
            // When disposing a SoundEffectInstance, the Sound should
            // just be stopped as it will likely be reused later
            _sound.Stop();
#endif
            isDisposed = true;
        }
 public void Stop()
 {
     for (int i = 0; i < _tracks.Length; i++)
     {
         Sound _sound = GetSound(i);
         if (_sound != null)
         {
             _sound.Stop();
         }
     }
     if (mUpdating)
     {
         mUpdating = false;
         _player.mData.bank.instances.Remove(this);
     }
 }
Exemple #5
0
 public void Stop(AudioStopOptions options)
 {
     _sound.Stop();
     _paused = false;
 }