diff --git a/BizHawk.Client.EmuHawk/AVOut/AVSync.cs b/BizHawk.Client.EmuHawk/AVOut/AVSync.cs index 6a917dff17..bd6e813ebf 100644 --- a/BizHawk.Client.EmuHawk/AVOut/AVSync.cs +++ b/BizHawk.Client.EmuHawk/AVOut/AVSync.cs @@ -17,7 +17,7 @@ namespace BizHawk.Client.EmuHawk private long _soundRemainder; // audio timekeeping for video dumping - public void DumpAV(IVideoProvider v, ISoundProvider s, out short[] samples, out int samplesprovided) + public void DumpAV(IVideoProvider v, IAsyncSoundProvider s, out short[] samples, out int samplesprovided) { if (!aset || !vset) throw new InvalidOperationException("Must set params first!"); diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index fca76872fd..178bb0dab2 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -1345,7 +1345,7 @@ namespace BizHawk.Client.EmuHawk // AVI/WAV state private IVideoWriter _currAviWriter; private HashSet _currAviWriterFrameList; - private ISoundProvider _aviSoundInput; + private IAsyncSoundProvider _aviSoundInput; private MetaspuSoundProvider _dumpProxy; // an audio proxy used for dumping private bool _dumpaudiosync; // set true to for experimental AV dumping private int _avwriterResizew; diff --git a/BizHawk.Client.EmuHawk/Sound/Sound.cs b/BizHawk.Client.EmuHawk/Sound/Sound.cs index d3fa5d96b9..50b3e0f73e 100644 --- a/BizHawk.Client.EmuHawk/Sound/Sound.cs +++ b/BizHawk.Client.EmuHawk/Sound/Sound.cs @@ -16,7 +16,7 @@ namespace BizHawk.Client.EmuHawk private bool _disposed; private ISoundOutput _soundOutput; private ISyncSoundProvider _syncSoundProvider; - private ISoundProvider _asyncSoundProvider; + private IAsyncSoundProvider _asyncSoundProvider; private SoundOutputProvider _outputProvider; private readonly BufferedAsync _semiSync = new BufferedAsync(); @@ -112,7 +112,7 @@ namespace BizHawk.Client.EmuHawk } } - public void SetAsyncInputPin(ISoundProvider source) + public void SetAsyncInputPin(IAsyncSoundProvider source) { if (_syncSoundProvider != null) { diff --git a/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs b/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs index 2d805f91fa..1c857150a6 100644 --- a/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs +++ b/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs @@ -7,7 +7,7 @@ using System.ComponentModel; namespace BizHawk.Emulation.Common { [CoreAttributes("NullHawk", "", false, true)] - public class NullEmulator : IEmulator, IVideoProvider, ISyncSoundProvider, ISoundProvider, ISettable + public class NullEmulator : IEmulator, IVideoProvider, ISyncSoundProvider, IAsyncSoundProvider, ISettable { public NullEmulator(CoreComm comm, object settings) { @@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Common private readonly int[] frameBuffer = new int[256 * 192]; private readonly Random rand = new Random(); public CoreComm CoreComm { get; private set; } - public ISoundProvider SoundProvider { get { return this; } } + public IAsyncSoundProvider SoundProvider { get { return this; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return true; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Common/Base Implementations/NullSound.cs b/BizHawk.Emulation.Common/Base Implementations/NullSound.cs index 7b314c2728..5d8d0d527e 100644 --- a/BizHawk.Emulation.Common/Base Implementations/NullSound.cs +++ b/BizHawk.Emulation.Common/Base Implementations/NullSound.cs @@ -1,6 +1,6 @@ namespace BizHawk.Emulation.Common { - public class NullSound : ISoundProvider + public class NullSound : IAsyncSoundProvider { public static readonly NullSound SilenceProvider = new NullSound(); diff --git a/BizHawk.Emulation.Common/Interfaces/IEmulator.cs b/BizHawk.Emulation.Common/Interfaces/IEmulator.cs index 8e9c1d7b35..16ce8c056b 100644 --- a/BizHawk.Emulation.Common/Interfaces/IEmulator.cs +++ b/BizHawk.Emulation.Common/Interfaces/IEmulator.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Common /// /// Sound provider for async operation. this is optional, and is only required after StartAsyncSound() is called and returns true /// - ISoundProvider SoundProvider { get; } + IAsyncSoundProvider SoundProvider { get; } /// /// sound provider for sync operation. this is manditory diff --git a/BizHawk.Emulation.Common/Interfaces/ISoundProvider.cs b/BizHawk.Emulation.Common/Interfaces/ISoundProvider.cs index 5809ed3a4c..19bdd18493 100644 --- a/BizHawk.Emulation.Common/Interfaces/ISoundProvider.cs +++ b/BizHawk.Emulation.Common/Interfaces/ISoundProvider.cs @@ -1,6 +1,6 @@ namespace BizHawk.Emulation.Common { - public interface ISoundProvider + public interface IAsyncSoundProvider { void GetSamples(short[] samples); void DiscardSamples(); diff --git a/BizHawk.Emulation.Common/Interfaces/ISyncSoundProvider.cs b/BizHawk.Emulation.Common/Interfaces/ISyncSoundProvider.cs index 3da3b32f31..1f8125ac3c 100644 --- a/BizHawk.Emulation.Common/Interfaces/ISyncSoundProvider.cs +++ b/BizHawk.Emulation.Common/Interfaces/ISyncSoundProvider.cs @@ -15,13 +15,13 @@ /// public class FakeSyncSound : ISyncSoundProvider { - private readonly ISoundProvider source; + private readonly IAsyncSoundProvider source; private readonly int spf; /// /// /// number of sample pairs to request and provide on each GetSamples() call - public FakeSyncSound(ISoundProvider source, int spf) + public FakeSyncSound(IAsyncSoundProvider source, int spf) { this.source = source; this.spf = spf; diff --git a/BizHawk.Emulation.Common/Sound/Utilities/BufferedAsync.cs b/BizHawk.Emulation.Common/Sound/Utilities/BufferedAsync.cs index 8e35254531..6d31352619 100644 --- a/BizHawk.Emulation.Common/Sound/Utilities/BufferedAsync.cs +++ b/BizHawk.Emulation.Common/Sound/Utilities/BufferedAsync.cs @@ -28,9 +28,9 @@ namespace BizHawk.Emulation.Common * that and then bypass the BufferedAsync. */ - public sealed class BufferedAsync : ISoundProvider + public sealed class BufferedAsync : IAsyncSoundProvider { - public ISoundProvider BaseSoundProvider; + public IAsyncSoundProvider BaseSoundProvider; readonly Queue buffer = new Queue(4096); diff --git a/BizHawk.Emulation.Common/Sound/Utilities/DCFilter.cs b/BizHawk.Emulation.Common/Sound/Utilities/DCFilter.cs index 759290d5cc..a11870daf9 100644 --- a/BizHawk.Emulation.Common/Sound/Utilities/DCFilter.cs +++ b/BizHawk.Emulation.Common/Sound/Utilities/DCFilter.cs @@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Common /// /// implements a DC block filter on top of an ISoundProvider. rather simple. /// - sealed public class DCFilter : ISoundProvider, ISyncSoundProvider + sealed public class DCFilter : IAsyncSoundProvider, ISyncSoundProvider { /* * A note about accuracy: @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Common * Analog output hardware ALWAYS has dc blocking caps. */ - ISoundProvider input; + IAsyncSoundProvider input; ISyncSoundProvider syncinput; int latchL = 0; @@ -35,7 +35,7 @@ namespace BizHawk.Emulation.Common int depth; - public static DCFilter AsISoundProvider(ISoundProvider input, int filterwidth) + public static DCFilter AsISoundProvider(IAsyncSoundProvider input, int filterwidth) { if (input == null) throw new ArgumentNullException(); @@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Common return new DCFilter(null, null, filterwidth); } - DCFilter(ISoundProvider input, ISyncSoundProvider syncinput, int filterwidth) + DCFilter(IAsyncSoundProvider input, ISyncSoundProvider syncinput, int filterwidth) { if (filterwidth < 8 || filterwidth > 65536) throw new ArgumentOutOfRangeException(); @@ -104,13 +104,13 @@ namespace BizHawk.Emulation.Common } } - void ISoundProvider.GetSamples(short[] samples) + void IAsyncSoundProvider.GetSamples(short[] samples) { input.GetSamples(samples); PushThroughSamples(samples, samples.Length); } - void ISoundProvider.DiscardSamples() + void IAsyncSoundProvider.DiscardSamples() { input.DiscardSamples(); } diff --git a/BizHawk.Emulation.Common/Sound/Utilities/Metaspu.cs b/BizHawk.Emulation.Common/Sound/Utilities/Metaspu.cs index 70c8747b73..f2b81d7877 100644 --- a/BizHawk.Emulation.Common/Sound/Utilities/Metaspu.cs +++ b/BizHawk.Emulation.Common/Sound/Utilities/Metaspu.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Common /// /// uses Metaspu to have an ISyncSoundProvider input to a ISoundProvider /// - public class MetaspuAsync : ISoundProvider + public class MetaspuAsync : IAsyncSoundProvider { private readonly ISynchronizingAudioBuffer buffer; private readonly ISyncSoundProvider input; @@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Common } } - public class MetaspuSoundProvider : ISoundProvider + public class MetaspuSoundProvider : IAsyncSoundProvider { public ISynchronizingAudioBuffer buffer; public MetaspuSoundProvider(ESynchMethod method) @@ -46,7 +46,7 @@ namespace BizHawk.Emulation.Common } private readonly short[] pullBuffer = new short[1470]; - public void PullSamples(ISoundProvider source) + public void PullSamples(IAsyncSoundProvider source) { Array.Clear(pullBuffer, 0, 1470); source.GetSamples(pullBuffer); diff --git a/BizHawk.Emulation.Common/Sound/Utilities/SoundMixer.cs b/BizHawk.Emulation.Common/Sound/Utilities/SoundMixer.cs index d865f96284..b3e25556d2 100644 --- a/BizHawk.Emulation.Common/Sound/Utilities/SoundMixer.cs +++ b/BizHawk.Emulation.Common/Sound/Utilities/SoundMixer.cs @@ -5,13 +5,13 @@ namespace BizHawk.Emulation.Common /// /// An interface that extends a sound provider to provide mixing capabilities through the SoundMixer class /// - public interface IMixedSoundProvider : ISoundProvider + public interface IMixedSoundProvider : IAsyncSoundProvider { int MaxVolume { get; set; } } // This is a straightforward class to mix/chain multiple ISoundProvider sources. - public sealed class SoundMixer : ISoundProvider + public sealed class SoundMixer : IAsyncSoundProvider { private readonly List SoundProviders; diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.IEmulator.cs b/BizHawk.Emulation.Cores/Calculator/TI83.IEmulator.cs index 6d64c4cf82..cb4b2df065 100644 --- a/BizHawk.Emulation.Cores/Calculator/TI83.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Calculator/TI83.IEmulator.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Calculators { public IEmulatorServiceProvider ServiceProvider { get; private set; } - public ISoundProvider SoundProvider + public IAsyncSoundProvider SoundProvider { get { return NullSound.SilenceProvider; } } diff --git a/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IEmulator.cs b/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IEmulator.cs index bf871b57ab..a51505f033 100644 --- a/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Computers/AppleII/AppleII.IEmulator.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII public IEmulatorServiceProvider ServiceProvider { get; private set; } [FeatureNotImplemented] - public ISoundProvider SoundProvider + public IAsyncSoundProvider SoundProvider { get { return null; } } diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs index 59344be702..b3330e59e8 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs @@ -139,7 +139,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64 public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } [SaveState.DoNotSave] - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } [SaveState.DoNotSave] public ISyncSoundProvider SyncSoundProvider { get; private set; } [SaveState.DoNotSave] diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.SoundProvider.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.SoundProvider.cs index 23aff2a84f..8fdade9814 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.SoundProvider.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Sid.SoundProvider.cs @@ -6,7 +6,7 @@ using BizHawk.Emulation.Common; namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS { - public sealed partial class Sid : ISoundProvider, ISyncSoundProvider + public sealed partial class Sid : IAsyncSoundProvider, ISyncSoundProvider { public int MaxVolume { diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs index 9ca2bdbf9a..41db6d6185 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs @@ -80,7 +80,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 public CoreComm CoreComm { get; private set; } - public ISoundProvider SoundProvider { get { return _dcfilter; } } + public IAsyncSoundProvider SoundProvider { get { return _dcfilter; } } // todo: make this not so ugly public ISyncSoundProvider SyncSoundProvider diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs index 95ffd34cd0..01f520baad 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/TIA.cs @@ -7,7 +7,7 @@ using System.Numerics; namespace BizHawk.Emulation.Cores.Atari.Atari2600 { // Emulates the TIA - public partial class TIA : IVideoProvider, ISoundProvider + public partial class TIA : IVideoProvider, IAsyncSoundProvider { #region palette diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.cs b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.cs index b4276ca878..2a354f3aa4 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.cs @@ -209,7 +209,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800 public ISyncSoundProvider SyncSoundProvider { get { return avProvider; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } MyAVProvider avProvider = new MyAVProvider(); diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs b/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs index ed1f62307b..18c8f93b9d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/lynx/Lynx.cs @@ -198,7 +198,7 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx short[] soundbuff = new short[2048]; int numsamp; - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs index 43b9df32d2..8332bb722e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs @@ -167,7 +167,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision public string SystemId { get { return "Coleco"; } } public GameInfo game; public CoreComm CoreComm { get; private set; } - public ISoundProvider SoundProvider { get { return PSG; } } + public IAsyncSoundProvider SoundProvider { get { return PSG; } } public string BoardName { get { return null; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs index 41509f0cdb..9a1007e511 100644 --- a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Intellivision private DCFilter _dcfilter; - public ISoundProvider SoundProvider + public IAsyncSoundProvider SoundProvider { get { return _dcfilter; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs index 6631c9ee4a..1df7af013d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs +++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs @@ -5,7 +5,7 @@ using BizHawk.Emulation.Common; namespace BizHawk.Emulation.Cores.Intellivision { - public sealed class PSG : ISoundProvider + public sealed class PSG : IAsyncSoundProvider { public ushort[] Register = new ushort[16]; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs index 52f68d713e..b3ff06aa78 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs @@ -204,7 +204,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA { nsamp = 0; } - public ISoundProvider SoundProvider { get { throw new InvalidOperationException(); } } + public IAsyncSoundProvider SoundProvider { get { throw new InvalidOperationException(); } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs index 50c9a62f4c..82d48d8de5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/Meteor.cs @@ -293,7 +293,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA short[] soundbuffer; GCHandle soundhandle; - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs index 0a0e9a4068..5fd4b5b2eb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs @@ -232,7 +232,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA short[] soundbuff = new short[2048]; int numsamp; - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs index a70067562a..ebab363ab7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -569,7 +569,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy #region ISoundProvider - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs index e4733ae3a6..7ef9122079 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs @@ -89,7 +89,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy public IEmulatorServiceProvider ServiceProvider { get; private set; } - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs index 830ed3e0fb..50560030b5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/N64/N64.cs @@ -268,7 +268,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64 public DisplayType Region { get { return _display_type; } } - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return _audioProvider.Resampler; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs index 9779feb64c..d12b5a9011 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs @@ -79,7 +79,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES magicSoundProvider = null; } - class MagicSoundProvider : ISoundProvider, ISyncSoundProvider, IDisposable + class MagicSoundProvider : IAsyncSoundProvider, ISyncSoundProvider, IDisposable { BlipBuffer blip; NES nes; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs index 61577a744c..ba2dddd43c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs @@ -334,7 +334,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } MyVideoProvider videoProvider; - public ISoundProvider SoundProvider { get { return magicSoundProvider; } } + public IAsyncSoundProvider SoundProvider { get { return magicSoundProvider; } } public ISyncSoundProvider SyncSoundProvider { get { return magicSoundProvider; } } public bool StartAsyncSound() { return true; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index 88a063235f..049b1426a2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -322,7 +322,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES #region SoundProvider - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs index 800a8812b4..1c9fbbf090 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES/LibsnesCore.cs @@ -1300,7 +1300,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES resampler.EnqueueSample((short)left, (short)right); } - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return resampler; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs index 8f5fe4ed2c..6cd9409863 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/SNES9X/Snes9x.cs @@ -75,7 +75,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X #region ISyncSoundProvider private short[] _sbuff = new short[2048]; - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs index 9304e3d1c8..5666d13d46 100644 --- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs +++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs @@ -406,8 +406,8 @@ namespace BizHawk.Emulation.Cores.PCEngine public CoreComm CoreComm { get; private set; } - ISoundProvider soundProvider; - public ISoundProvider SoundProvider + IAsyncSoundProvider soundProvider; + public IAsyncSoundProvider SoundProvider { get { return soundProvider; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs index 6680247f3d..ca693f00c0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/Genesis/Genesis.cs @@ -301,7 +301,7 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis public CoreComm CoreComm { get; private set; } - public ISoundProvider SoundProvider + public IAsyncSoundProvider SoundProvider { get { return SoundMixer; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IEmulator.cs index 3770568f83..4fb8361a9a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IEmulator.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem { public IEmulatorServiceProvider ServiceProvider { get; private set; } - public ISoundProvider SoundProvider + public IAsyncSoundProvider SoundProvider { get { return ActiveSoundProvider; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs index 5fc49ae247..696da68ceb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs @@ -118,7 +118,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem SoundMixer = new SoundMixer(YM2413, PSG); if (HasYM2413 && game["WhenFMDisablePSG"]) SoundMixer.DisableSource(PSG); - ActiveSoundProvider = HasYM2413 ? (ISoundProvider)SoundMixer : PSG; + ActiveSoundProvider = HasYM2413 ? (IAsyncSoundProvider)SoundMixer : PSG; SystemRam = new byte[0x2000]; @@ -310,7 +310,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem else if (port == 0xF2 && HasYM2413) YM2413.DetectionValue = value; } - private ISoundProvider ActiveSoundProvider; + private IAsyncSoundProvider ActiveSoundProvider; private string _region; private string RegionStr diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs index 405c078526..ef1bf91d4b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Yabause.cs @@ -364,7 +364,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn } public void DiscardSamples() { } - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IEmulator.cs index 99348a580f..3c30f7b605 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx/GPGX.IEmulator.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx { public IEmulatorServiceProvider ServiceProvider { get; private set; } - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs index dc927d14ef..e6b745f7e9 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/gpgx64/GPGX.IEmulator.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64 { public IEmulatorServiceProvider ServiceProvider { get; private set; } - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSP/PSP.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSP/PSP.cs index d5b2af5196..d5c24b5474 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sony/PSP/PSP.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSP/PSP.cs @@ -41,7 +41,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSP } }; - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs index 867f8e71c6..9b6096fdec 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sony/PSX/Octoshock.cs @@ -861,7 +861,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX private short[] sbuff = new short[1611 * 2]; //need this for pal private int sbuffcontains = 0; - public ISoundProvider SoundProvider { get { throw new InvalidOperationException(); } } + public IAsyncSoundProvider SoundProvider { get { throw new InvalidOperationException(); } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs index 4746759cec..60a62c9c23 100644 --- a/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs +++ b/BizHawk.Emulation.Cores/Consoles/WonderSwan/WonderSwan.cs @@ -221,7 +221,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan private short[] sbuff = new short[1536]; private int sbuffcontains = 0; - public ISoundProvider SoundProvider { get { throw new InvalidOperationException(); } } + public IAsyncSoundProvider SoundProvider { get { throw new InvalidOperationException(); } } public ISyncSoundProvider SyncSoundProvider { get { return this; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { } diff --git a/BizHawk.Emulation.Cores/Libretro/LibRetroEmulator.cs b/BizHawk.Emulation.Cores/Libretro/LibRetroEmulator.cs index 49a885bfaf..4068e1dd08 100644 --- a/BizHawk.Emulation.Cores/Libretro/LibRetroEmulator.cs +++ b/BizHawk.Emulation.Cores/Libretro/LibRetroEmulator.cs @@ -737,7 +737,7 @@ namespace BizHawk.Emulation.Cores #region ISoundProvider - public ISoundProvider SoundProvider { get { return null; } } + public IAsyncSoundProvider SoundProvider { get { return null; } } public ISyncSoundProvider SyncSoundProvider { get { return resampler; } } public bool StartAsyncSound() { return false; } public void EndAsyncSound() { }