コード例 #1
0
 /// <summary>
 /// Raises SoundEvent
 /// </summary>
 /// <param name="e">SoundEvent Args</param>
 protected void OnSoundEvent(SoundEventArgs e)
 {
     if (SoundEvent != null)
     {
         SoundEvent(this, e);
     }
 }
コード例 #2
0
 private void ProcessSoundEvent(object sender, SoundEventArgs e)
 {
     if (e.Action == SoundAction.Stop)
     {
         this.Stop();
     }
     else if (e.Action == SoundAction.Fadeout)
     {
         this.Fadeout(e.FadeoutTime);
     }
     else
     {
         throw new SdlException();
     }
 }
コード例 #3
0
ファイル: Channel.cs プロジェクト: ywjno/mynes-code
 private void ProcessSoundEvent(object sender, SoundEventArgs e)
 {
     if (e.Action == SoundAction.Stop)
     {
         this.Stop();
     }
     else if (e.Action == SoundAction.Fadeout)
     {
         this.Fadeout(e.FadeoutTime);
     }
     else
     {
         throw new SdlException();
     }
 }
コード例 #4
0
ファイル: Sound.cs プロジェクト: ywjno/mynes-code
 /// <summary>
 /// Raises SoundEvent
 /// </summary>
 /// <param name="e">SoundEvent Args</param>
 protected void OnSoundEvent(SoundEventArgs e)
 {
     if (SoundEvent != null)
     {
         SoundEvent(this, e);
     }
 }
コード例 #5
0
ファイル: Sound.cs プロジェクト: ywjno/mynes-code
 /// <summary>
 /// Fades out the sound sample.
 /// </summary>
 public void Fadeout(int fadeoutTime)
 {
     SoundEventArgs args = new SoundEventArgs(SoundAction.Fadeout, fadeoutTime);
     OnSoundEvent(args);
 }
コード例 #6
0
ファイル: Sound.cs プロジェクト: ywjno/mynes-code
 /// <summary>
 /// Stops the sound sample.
 /// </summary>
 public void Stop()
 {
     SoundEventArgs args = new SoundEventArgs(SoundAction.Stop);
     OnSoundEvent(args);
 }
コード例 #7
0
        /// <summary>
        /// Fades out the sound sample.
        /// </summary>
        public void Fadeout(int fadeoutTime)
        {
            SoundEventArgs args = new SoundEventArgs(SoundAction.Fadeout, fadeoutTime);

            OnSoundEvent(args);
        }
コード例 #8
0
        /// <summary>
        /// Stops the sound sample.
        /// </summary>
        public void Stop()
        {
            SoundEventArgs args = new SoundEventArgs(SoundAction.Stop);

            OnSoundEvent(args);
        }