Added a "Configuration.Settings.General.WaveformUpdateIntervalMs "setting - and new default value of 30 (old was 100) which should give a smoother running current pos vert line in waveform

This commit is contained in:
Nikolaj Olsson 2016-06-13 19:27:24 +02:00
parent 1b738a4a16
commit 22af07b560
2 changed files with 8 additions and 0 deletions

View File

@ -534,6 +534,7 @@ namespace Nikse.SubtitleEdit.Core
public string UndockedWaveformPosition { get; set; }
public string UndockedVideoControlsPosition { get; set; }
public bool WaveformCenter { get; set; }
public int WaveformUpdateIntervalMs { get; set; }
public int SmallDelayMilliseconds { get; set; }
public int LargeDelayMilliseconds { get; set; }
public bool ShowOriginalAsPreviewIfAvailable { get; set; }
@ -636,6 +637,7 @@ namespace Nikse.SubtitleEdit.Core
UndockedVideoPosition = "-32000;-32000";
UndockedWaveformPosition = "-32000;-32000";
UndockedVideoControlsPosition = "-32000;-32000";
WaveformUpdateIntervalMs = 30;
SmallDelayMilliseconds = 500;
LargeDelayMilliseconds = 5000;
OpenSubtitleExtraExtensions = "*.mp4;*.m4v;*.mkv;*.ts"; // matroska/mp4/m4v files (can contain subtitles)
@ -1461,6 +1463,9 @@ namespace Nikse.SubtitleEdit.Core
subNode = node.SelectSingleNode("WaveformCenter");
if (subNode != null)
settings.General.WaveformCenter = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("WaveformUpdateIntervalMs");
if (subNode != null)
settings.General.WaveformUpdateIntervalMs = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("SmallDelayMilliseconds");
if (subNode != null)
settings.General.SmallDelayMilliseconds = Convert.ToInt32((subNode.InnerText));
@ -2864,6 +2869,7 @@ namespace Nikse.SubtitleEdit.Core
textWriter.WriteElementString("UndockedWaveformPosition", settings.General.UndockedWaveformPosition);
textWriter.WriteElementString("UndockedVideoControlsPosition", settings.General.UndockedVideoControlsPosition);
textWriter.WriteElementString("WaveformCenter", settings.General.WaveformCenter.ToString());
textWriter.WriteElementString("WaveformUpdateIntervalMs", settings.General.WaveformUpdateIntervalMs.ToString());
textWriter.WriteElementString("SmallDelayMilliseconds", settings.General.SmallDelayMilliseconds.ToString(CultureInfo.InvariantCulture));
textWriter.WriteElementString("LargeDelayMilliseconds", settings.General.LargeDelayMilliseconds.ToString(CultureInfo.InvariantCulture));
textWriter.WriteElementString("ShowOriginalAsPreviewIfAvailable", settings.General.ShowOriginalAsPreviewIfAvailable.ToString());

View File

@ -520,6 +520,8 @@ namespace Nikse.SubtitleEdit.Forms
audioVisualizer.MouseWheelScrollUpIsForward = Configuration.Settings.VideoControls.WaveformMouseWheelScrollUpIsForward;
audioVisualizer.AllowOverlap = Configuration.Settings.VideoControls.WaveformAllowOverlap;
audioVisualizer.ClosenessForBorderSelection = Configuration.Settings.VideoControls.WaveformBorderHitMs;
if (Configuration.Settings.General.WaveformUpdateIntervalMs > 0 && Configuration.Settings.General.WaveformUpdateIntervalMs < 200)
timerWaveform.Interval = Configuration.Settings.General.WaveformUpdateIntervalMs;
for (double zoomCounter = AudioVisualizer.ZoomMinimum; zoomCounter <= AudioVisualizer.ZoomMaximum + (0.001); zoomCounter += 0.1)
{