Пример #1
0
 public override void Play()
 {
     wave.Volume = clip.Volume;
     if (wave.Playing)
     {
         wave.Stop();
     }
     wave.Play();
 }
Пример #2
0
 public void Play()
 {
     if (complexSound)
     {
         foreach (XactClip clip in soundClips)
         {
             clip.Play();
         }
     }
     else
     {
         if (wave.Playing)
         {
             wave.Stop();
         }
         wave.Play();
     }
 }
Пример #3
0
        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;
        }
Пример #4
0
 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);
     }
 }
Пример #5
0
 public void Stop(AudioStopOptions options)
 {
     _sound.Stop();
     _paused = false;
 }