From aac25082d00840b3606330c368f38bea59d72e5b Mon Sep 17 00:00:00 2001 From: nattthebear Date: Fri, 16 Jun 2017 14:11:43 -0400 Subject: [PATCH] Video dumping: Store the audiosync option in configuration, and default it to true. If the emulator's av output is perfect, the two will produce identical results. In every instance I'm aware of where the emulator's av output is not perfect, the audio sync mode will produce better results. --- BizHawk.Client.Common/config/Config.cs | 1 + BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs | 3 ++- BizHawk.Client.EmuHawk/MainForm.cs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index 23fffa7775..48d730cda4 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -398,6 +398,7 @@ namespace BizHawk.Client.Common public string AVICodecToken = ""; public int GifWriterFrameskip = 3; public int GifWriterDelay = -1; + public bool VideoWriterAudioSync = true; #region emulation core settings diff --git a/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs b/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs index 8ef96ae9e1..af71887eaa 100644 --- a/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs +++ b/BizHawk.Client.EmuHawk/AVOut/VideoWriterChooserForm.cs @@ -47,7 +47,7 @@ namespace BizHawk.Client.EmuHawk /// list of IVideoWriters to choose from /// parent window /// user choice, or null on Cancel\Close\invalid - public static IVideoWriter DoVideoWriterChoserDlg(IEnumerable list, IWin32Window owner, out int resizew, out int resizeh, out bool pad, out bool audiosync) + public static IVideoWriter DoVideoWriterChoserDlg(IEnumerable list, IWin32Window owner, out int resizew, out int resizeh, out bool pad, ref bool audiosync) { VideoWriterChooserForm dlg = new VideoWriterChooserForm { @@ -76,6 +76,7 @@ namespace BizHawk.Client.EmuHawk c.Enabled = false; } + dlg.checkBoxASync.Checked = audiosync; DialogResult result = dlg.ShowDialog(owner); IVideoWriter ret; diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 8902e740e0..246f0afc84 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -3120,6 +3120,7 @@ namespace BizHawk.Client.EmuHawk videowritername = Global.Config.VideoWriter; } + _dumpaudiosync = Global.Config.VideoWriterAudioSync; if (unattended && !string.IsNullOrEmpty(videowritername)) { aw = VideoWriterInventory.GetVideoWriter(videowritername); @@ -3127,7 +3128,7 @@ namespace BizHawk.Client.EmuHawk else { aw = VideoWriterChooserForm.DoVideoWriterChoserDlg(VideoWriterInventory.GetAllWriters(), this, - out _avwriterResizew, out _avwriterResizeh, out _avwriterpad, out _dumpaudiosync); + out _avwriterResizew, out _avwriterResizeh, out _avwriterpad, ref _dumpaudiosync); } if (aw == null)