From 9b8e54989cf3d3c9644ad0ec5b2c693da102a44f Mon Sep 17 00:00:00 2001 From: goyuken Date: Wed, 5 Sep 2012 00:36:38 +0000 Subject: [PATCH] now that i've had a little more time to understand Metaspu, i see quite easily how it can be used in the place of DualSound, so do that. only actual effect of change should be how audio sounds while recording is going on. as an orphan, DualSound will likely be deleted soon. --- BizHawk.MultiClient/MainForm.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 706a523e86..3c8dda1de4 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -43,7 +43,7 @@ namespace BizHawk.MultiClient /// /// an audio proxy used for dumping /// - Emulation.Sound.Utilities.DualSound DumpProxy = null; + Emulation.Sound.MetaspuSoundProvider DumpProxy = null; /// audio timekeeping for video dumping long SoundRemainder = 0; @@ -2013,7 +2013,8 @@ namespace BizHawk.MultiClient SoundRemainder = nsampnum % Global.Emulator.CoreOutputComm.VsyncNum; short[] temp = new short[nsamp * 2]; - //Global.Emulator.SoundProvider.GetSamples(temp); + Global.Emulator.SoundProvider.GetSamples(temp); + DumpProxy.buffer.enqueue_samples(temp, (int)nsamp); DumpProxy.GetSamples(temp); //genSound = false; @@ -2062,7 +2063,7 @@ namespace BizHawk.MultiClient { // change audio path if dumping is occuring if (DumpProxy != null) - Global.Sound.UpdateSound(DumpProxy.secondpin); + Global.Sound.UpdateSound(DumpProxy); else Global.Sound.UpdateSound(Global.Emulator.SoundProvider); } @@ -2981,7 +2982,7 @@ namespace BizHawk.MultiClient } // buffersize here is entirely guess - DumpProxy = new Emulation.Sound.Utilities.DualSound(Global.Emulator.SoundProvider, 8192); + DumpProxy = new Emulation.Sound.MetaspuSoundProvider(Emulation.Sound.ESynchMethod.ESynchMethod_Z); SoundRemainder = 0; }