示例#1
0
 public void Stop(AudioStopOptions stopOptions)
 {
     _cue.Stop(stopOptions);
     if (OnFinished != null)
     {
         OnFinished(Name);
     }
 }
示例#2
0
        public void Stop(AudioStopOptions options)
        {
            if (IsPlaying || IsStopping)
            {
                if (!IsPaused)
                {
                    if (options == AudioStopOptions.AsAuthored)
                    {
                        if (INTERNAL_data.FadeOutMS > 0)
                        {
                            INTERNAL_startFadeOut(INTERNAL_data.FadeOutMS);
                            return;
                        }
                        else if (INTERNAL_maxRpcReleaseTime > 0)
                        {
                            INTERNAL_startReleaseRpc(INTERNAL_maxRpcReleaseTime);
                            return;
                        }
                    }
                }
                INTERNAL_timer.Stop();
                INTERNAL_timer.Reset();
                foreach (SoundEffectInstance sfi in INTERNAL_instancePool)
                {
                    sfi.Stop();
                    sfi.Dispose();
                }
                INTERNAL_instancePool.Clear();
                INTERNAL_instanceVolumes.Clear();
                INTERNAL_instancePitches.Clear();
                INTERNAL_rpcTrackVolumes.Clear();
                INTERNAL_rpcTrackPitches.Clear();
                INTERNAL_userControlledPlaying = false;
                INTERNAL_category.INTERNAL_removeActiveCue(this);

                IsStopped = true;

                // If this is a managed Cue, we're done here.
                if (INTERNAL_isManaged)
                {
                    Dispose();
                }
            }
        }
示例#3
0
        public override void Apply(Cue cue, XACTClip track, float elapsedTime)
        {
            StopEvent evt = (StopEvent)Event;

            AudioStopOptions stopOptions = evt.StopOptions;

            switch (evt.Scope)
            {
            case XACTClip.StopEventScope.Cue:
                cue.Stop(stopOptions);
                break;

            case XACTClip.StopEventScope.Track:
                /* FIXME: Need to stop this and ONLY this track
                 * track.Stop(stopOptions);
                 */
                break;
            }

            Played = true;
        }
示例#4
0
        public void Stop(AudioStopOptions options)
        {
            if (INTERNAL_queuedPlayback)
            {
                INTERNAL_queuedPlayback = false;
                INTERNAL_category.INTERNAL_removeActiveCue(this);
                return;
            }
            foreach (SoundEffectInstance sfi in INTERNAL_instancePool)
            {
                sfi.Stop();
                sfi.Dispose();
            }
            INTERNAL_instancePool.Clear();
            INTERNAL_instanceVolumes.Clear();
            INTERNAL_userControlledPlaying = false;
            INTERNAL_category.INTERNAL_removeActiveCue(this);

            // If this is a managed Cue, we're done here.
            if (INTERNAL_isManaged)
            {
                Dispose();
            }
        }
示例#5
0
文件: Cue.cs 项目: clarvalon/FNA
		public void Stop(AudioStopOptions options)
		{
			if (IsPlaying)
			{
				if (	options == AudioStopOptions.AsAuthored &&
					INTERNAL_data.FadeOutMS > 0	)
				{
					INTERNAL_startFadeOut(INTERNAL_data.FadeOutMS);
					return;
				}
				INTERNAL_timer.Stop();
				INTERNAL_timer.Reset();
				foreach (SoundEffectInstance sfi in INTERNAL_instancePool)
				{
					sfi.Stop();
					sfi.Dispose();
				}
				INTERNAL_instancePool.Clear();
				INTERNAL_instanceVolumes.Clear();
				INTERNAL_instancePitches.Clear();
				INTERNAL_rpcTrackVolumes.Clear();
				INTERNAL_rpcTrackPitches.Clear();
				INTERNAL_userControlledPlaying = false;
				INTERNAL_category.INTERNAL_removeActiveCue(this);

				// If this is a managed Cue, we're done here.
				if (INTERNAL_isManaged)
				{
					Dispose();
				}
			}
		}
示例#6
0
 public void Stop(AudioStopOptions options)
 {
     cue.Stop(options);
 }
示例#7
0
        public void Stop(AudioStopOptions options, bool stopSong)
        {
            foreach (Cue c in activeCues)
            {
                c.Stop(options);
            }
            activeCues.Clear();

            if (stopSong)
            {
                if (currentSongCue != null &&
                    !currentSongCue.IsDisposed)
                {
                    currentSongCue.Stop(options);
                }
                gameHasControl = MediaPlayer.GameHasControl;
                if (gameHasControl)
                {
                    try
                    {
                        MediaPlayer.Stop();
                    }
                    catch { }
                    currentMediaPlayerSong = null;
                }
            }
        }
 public void Stop( AudioStopOptions options )
 {
     if (m_AudioCategory != null)
         m_AudioCategory.Stop(options);
 }
示例#9
0
 public override void Stop(AudioStopOptions options)
 {
     base.Stop(options);
     underlying = null;
 }
示例#10
0
 public override void Stop(AudioStopOptions options) => cue.Stop(options);
 //stops all 3D cues - AudioStopOptions: AsAuthored and Immediate
 public void StopAll3DCues(AudioStopOptions audioStopOptions)
 {
     foreach (Cue3D cue3D in this.cueList)
     {
         cue3D.Cue.Stop(audioStopOptions);
         this.cueList.Remove(cue3D);
     }
 }
示例#12
0
 public void Stop(string SoundName, AudioStopOptions StopOptions)
 {
     this.soundBank.GetCue(SoundName).Stop(StopOptions);
 }
示例#13
0
 public void Stop(AudioStopOptions options)
 {
     _sound.Stop();
     _paused = false;
 }
 //stop a 3D cue - AudioStopOptions: AsAuthored and Immediate
 public void Stop3DCue(string cueName, AudioStopOptions audioStopOptions)
 {
     Cue3D cue3D = Get3DCue(cueName);
     if (cue3D != null)
     {
         cue3D.Cue.Stop(audioStopOptions);
         this.playSet.Remove(cue3D.Cue.Name);
         this.cueList.Remove(cue3D);
     }
 }
示例#15
0
 /// <summary>Stop the audio playback, if applicable.</summary>
 /// <param name="options">When to stop the audio.</param>
 public void Stop(AudioStopOptions options)
 {
     this.Stop(options, true);
 }
示例#16
0
 public override void Stop(AudioStopOptions options) => instance.Stop();
示例#17
0
 public void stop(AudioStopOptions options)
 {
     cue.Stop(options);
 }
 //use when you want to stop a 2D OR 3D sound
 public SoundEventData(string id, object sender, EventActionType eventType,
                       EventCategoryType eventCategoryType, string cueName, AudioStopOptions audioStopOptions)
     : this(id, sender, eventType, eventCategoryType, cueName, audioStopOptions, null)
 {
 }
 //stop a 2D cue - AudioStopOptions: AsAuthored and Immediate
 public void StopCue(string cueName, AudioStopOptions audioStopOptions)
 {
     Cue cue = this.soundBank.GetCue(cueName);
     if ((cue != null) && (cue.IsPlaying))
         cue.Stop(audioStopOptions);
 }
示例#20
0
        public void StopCue(string cueName, AudioStopOptions options = AudioStopOptions.AsAuthored)
        {
            var cue = PlayedCues.SingleOrDefault(c => c.Name == cueName);
            if (cue == null) { return; }

            StopCue(cue, options);
        }
示例#21
0
文件: Cue.cs 项目: khbecker/FNA
        public void Stop(AudioStopOptions options)
        {
            if (INTERNAL_queuedPlayback)
            {
                INTERNAL_queuedPlayback = false;
                INTERNAL_category.INTERNAL_removeActiveCue(this);
                return;
            }
            foreach (SoundEffectInstance sfi in INTERNAL_instancePool)
            {
                sfi.Stop();
                sfi.Dispose();
            }
            INTERNAL_instancePool.Clear();
            INTERNAL_instanceVolumes.Clear();
            INTERNAL_instancePitches.Clear();
            INTERNAL_userControlledPlaying = false;
            INTERNAL_category.INTERNAL_removeActiveCue(this);

            // If this is a managed Cue, we're done here.
            if (INTERNAL_isManaged)
            {
                Dispose();
            }
        }
示例#22
0
 //* -----------------------------------------------------------------------*
 /// <summary>音声を停止します。</summary>
 ///
 /// <param name="name">フレンドリ名。</param>
 /// <param name="options">
 /// どのようにサウンドを停止するかを指定する列挙値。
 /// </param>
 /// <returns>再開した場合、<c>true</c>。</returns>
 public bool stop(string name, AudioStopOptions options)
 {
     return(command(name, c => c.Stop(options)));
 }
示例#23
0
 //* -----------------------------------------------------------------------*
 /// <summary>音声を停止します。</summary>
 ///
 /// <param name="name">フレンドリ名。</param>
 /// <param name="options">
 /// どのようにサウンドを停止するかを指定する列挙値。
 /// </param>
 /// <returns>再開した場合、<c>true</c>。</returns>
 public bool stop(string name, AudioStopOptions options)
 {
     return(false);
 }
示例#24
0
 public abstract void Stop(AudioStopOptions options);
 public void Stop(AudioStopOptions options)
 {
 }
示例#26
0
文件: Cue.cs 项目: Cardanis/MonoGame
        /// <summary>Stops playback of a Cue.</summary>
        /// <param name="options">Specifies if the sound should play any pending release phases or transitions before stopping.</param>
		public void Stop(AudioStopOptions options)
		{
            _engine._activeCues.Remove(this);
			
			if (_curSound != null)
                _curSound.Stop(options);
		}
示例#27
0
 public void StopCue(Cue cue, AudioStopOptions options = AudioStopOptions.AsAuthored)
 {
     if (!cue.IsStopped)
     {
         cue.Stop(options);
     }
 }
示例#28
0
 public void Stop(AudioStopOptions options)
 {
     if (!Sound.IsDisposed)
         Sound.Stop(options == AudioStopOptions.Immediate);
 }
示例#29
0
 public void Stop(AudioStopOptions options)
 {
     throw new NotImplementedException();
 }
示例#30
0
 //* -----------------------------------------------------------------------*
 /// <summary>音声を全て停止します。</summary>
 ///
 /// <param name="options">
 /// どのようにサウンドを停止するかを指定する列挙値。
 /// </param>
 public void stop(AudioStopOptions options)
 {
 }
示例#31
0
文件: Cue.cs 项目: Zeludon/FEZ
 public void Stop(AudioStopOptions options)
 {
   if (this.curSound != null)
     this.curSound.Stop();
   this.paused = false;
 }
示例#32
0
文件: Cue.cs 项目: jbekkedal/MonoGame
 public void Stop(AudioStopOptions options)
 {
     _sound.Stop();
     _paused = false;
 }
示例#33
0
 internal void StopAll(AudioStopOptions options)
 {
     if (_complexSound)
     {
         foreach (XactClip clip in _soundClips)
             clip.Stop();
     }
     else
     {
         if (_wave != null)
         {
             _wave.Stop();
             _wave = null;
         }
     }
 }
示例#34
0
 public void Stop(string SoundName, AudioStopOptions StopOptions)
 {
     this.soundBank.GetCue(SoundName).Stop(StopOptions);
 }
示例#35
0
		public void Stop(AudioStopOptions options)
        {
            if (_complexSound)
            {
                foreach (var sound in _soundClips)
                    sound.Stop();
            }
            else
            {
                if (_wave != null)
                {
                    _wave.Stop();
                    _wave = null;
                }
            }
		}
示例#36
0
 public void Stop(AudioStopOptions options)
 {
     throw new NotImplementedException();
 }
示例#37
0
文件: Cue.cs 项目: adison/Tank-Wars
		public void Stop(AudioStopOptions options)
		{
			if (curSound != null) {
				curSound.Stop();
			}
			paused = false;
		}
示例#38
0
 public void Stop(AudioStopOptions options)
 {
     if (modMusic != null)
     {
         modMusic.Stop(options.HasFlag(AudioStopOptions.Immediate));
     }
     else
     {
         cue.Stop(options);
     }
 }
示例#39
0
		public void Stop(AudioStopOptions options)
		{
			if (curSound != null) {
				curSound.Stop();
			}
		}