Example #1
0
        private void ResetDelay()
        {
            if (m_LavAudioSettings == null)
            {
                return;
            }

            ComThread.Do(() => m_LavAudioSettings.SetAudioDelay(false, 0));

            ShowDelayText(0);
        }
Example #2
0
 public void AudioDelayPlus()
 {
     try
     {
         if (_baseFilterLavAudio != null)
         {
             ILAVAudioSettings asett = _baseFilterLavAudio as ILAVAudioSettings;
             if (asett != null)
             {
                 bool enable;
                 int  delay;
                 var  hr = asett.GetAudioDelay(out enable, out delay);
                 DsError.ThrowExceptionForHR(hr);
                 hr = asett.SetAudioDelay(true, delay + AudioDelayInterval);
                 DsError.ThrowExceptionForHR(hr);
             }
         }
     }
     catch (Exception)
     {
         if (_baseFilterLavAudio != null)
         {
             DirectShowUtil.ReleaseComObject(_baseFilterLavAudio);
             _baseFilterLavAudio = null;
         }
     }
 }
Example #3
0
 public void AudioDelayMinus()
 {
     try
     {
         if (_baseFilterLavAudio != null)
         {
             ILAVAudioSettings asett = _baseFilterLavAudio as ILAVAudioSettings;
             if (asett != null)
             {
                 bool enable;
                 int  delay;
                 var  hr = asett.GetAudioDelay(out enable, out delay);
                 DsError.ThrowExceptionForHR(hr);
                 hr = asett.SetAudioDelay(true, delay - AudioDelayInterval);
                 DsError.ThrowExceptionForHR(hr);
             }
         }
     }
     catch (Exception ex)
     {
         Log.Error("LAVEngine: AudioDelayMinus: {0}", ex.Message);
         if (_baseFilterLavAudio != null)
         {
             DirectShowUtil.ReleaseComObject(_baseFilterLavAudio);
             _baseFilterLavAudio = null;
         }
     }
 }