예제 #1
0
 override public void OnEffectsEvent(object sender, EffectsEventArgs e)
 {
     lock (_lock)
     {
         _voiceOutput.UpdateSoundConfig(e.effects.SoundEffects.Count > 0, _conf.Update(e.effects));
     }
 }
예제 #2
0
 override public void OnEffectsEvent(object sender, EffectsEventArgs e)
 {
     lock (_lock)
     {
         bool newEffects = _conf.Update(e.effects);
         foreach (MediaPlayer pl in _players)
         {
             pl.UpdateSoundConfig(e.effects.SoundEffects.Count > 0, newEffects);
         }
         // _players[0].UpdateSoundConfig(e.effects.SoundEffects.Count > 0, newEffects);
         //_players[1].UpdateSoundConfig(e.effects.SoundEffects.Count > 0, newEffects);
         _rotateSpeed = DefaultRotateSpeed * ((double)_conf.Freqq.Value / (double)44100) * (_rotateSpeed > 0 ? 1 : -1);
         if (e.effects.Reverse.HasValue && e.effects.Reverse.Value ^ (_rotateSpeed < 0))
         {
             _rotateSpeed *= -1;
             if (_vinilPlayer != null && _vinilPlayer.IsPlaying)
             {
                 _vinilPlayer.Stop();
                 int pos = _vinilBytesNum - _vinilPlayer.Pos - 1;
                 _vinilPlayer = _players[((int)_vinilPlayer.Tag + 1) % 2];
                 _vinilPlayer.Play(true, pos);
             }
         }
     }
 }