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; } } }
private void AddDelay(int delayMs) { if (m_LavAudioSettings == null) { return; } int delay = 0; ComThread.Do(() => { bool enabled; m_LavAudioSettings.GetAudioDelay(out enabled, out delay); if (!enabled) { delay = 0; } delay += delayMs; m_LavAudioSettings.SetAudioDelay(true, delay); }); ShowDelayText(delay); }
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; } } }