Rename ISoundProvider to IAsyncSoundProvider to more accurately describe what the service does

This commit is contained in:
adelikat 2016-12-09 10:24:43 -06:00
parent 5b31b33713
commit b697110098
45 changed files with 59 additions and 59 deletions

View File

@ -17,7 +17,7 @@ namespace BizHawk.Client.EmuHawk
private long _soundRemainder; // audio timekeeping for video dumping 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) if (!aset || !vset)
throw new InvalidOperationException("Must set params first!"); throw new InvalidOperationException("Must set params first!");

View File

@ -1345,7 +1345,7 @@ namespace BizHawk.Client.EmuHawk
// AVI/WAV state // AVI/WAV state
private IVideoWriter _currAviWriter; private IVideoWriter _currAviWriter;
private HashSet<int> _currAviWriterFrameList; private HashSet<int> _currAviWriterFrameList;
private ISoundProvider _aviSoundInput; private IAsyncSoundProvider _aviSoundInput;
private MetaspuSoundProvider _dumpProxy; // an audio proxy used for dumping private MetaspuSoundProvider _dumpProxy; // an audio proxy used for dumping
private bool _dumpaudiosync; // set true to for experimental AV dumping private bool _dumpaudiosync; // set true to for experimental AV dumping
private int _avwriterResizew; private int _avwriterResizew;

View File

@ -16,7 +16,7 @@ namespace BizHawk.Client.EmuHawk
private bool _disposed; private bool _disposed;
private ISoundOutput _soundOutput; private ISoundOutput _soundOutput;
private ISyncSoundProvider _syncSoundProvider; private ISyncSoundProvider _syncSoundProvider;
private ISoundProvider _asyncSoundProvider; private IAsyncSoundProvider _asyncSoundProvider;
private SoundOutputProvider _outputProvider; private SoundOutputProvider _outputProvider;
private readonly BufferedAsync _semiSync = new BufferedAsync(); 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) if (_syncSoundProvider != null)
{ {

View File

@ -7,7 +7,7 @@ using System.ComponentModel;
namespace BizHawk.Emulation.Common namespace BizHawk.Emulation.Common
{ {
[CoreAttributes("NullHawk", "", false, true)] [CoreAttributes("NullHawk", "", false, true)]
public class NullEmulator : IEmulator, IVideoProvider, ISyncSoundProvider, ISoundProvider, ISettable<NullEmulator.NullEmulatorSettings, object> public class NullEmulator : IEmulator, IVideoProvider, ISyncSoundProvider, IAsyncSoundProvider, ISettable<NullEmulator.NullEmulatorSettings, object>
{ {
public NullEmulator(CoreComm comm, object settings) public NullEmulator(CoreComm comm, object settings)
{ {
@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Common
private readonly int[] frameBuffer = new int[256 * 192]; private readonly int[] frameBuffer = new int[256 * 192];
private readonly Random rand = new Random(); private readonly Random rand = new Random();
public CoreComm CoreComm { get; private set; } 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 ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return true; } public bool StartAsyncSound() { return true; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -1,6 +1,6 @@
namespace BizHawk.Emulation.Common namespace BizHawk.Emulation.Common
{ {
public class NullSound : ISoundProvider public class NullSound : IAsyncSoundProvider
{ {
public static readonly NullSound SilenceProvider = new NullSound(); public static readonly NullSound SilenceProvider = new NullSound();

View File

@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Common
/// <summary> /// <summary>
/// Sound provider for async operation. this is optional, and is only required after StartAsyncSound() is called and returns true /// Sound provider for async operation. this is optional, and is only required after StartAsyncSound() is called and returns true
/// </summary> /// </summary>
ISoundProvider SoundProvider { get; } IAsyncSoundProvider SoundProvider { get; }
/// <summary> /// <summary>
/// sound provider for sync operation. this is manditory /// sound provider for sync operation. this is manditory

View File

@ -1,6 +1,6 @@
namespace BizHawk.Emulation.Common namespace BizHawk.Emulation.Common
{ {
public interface ISoundProvider public interface IAsyncSoundProvider
{ {
void GetSamples(short[] samples); void GetSamples(short[] samples);
void DiscardSamples(); void DiscardSamples();

View File

@ -15,13 +15,13 @@
/// </summary> /// </summary>
public class FakeSyncSound : ISyncSoundProvider public class FakeSyncSound : ISyncSoundProvider
{ {
private readonly ISoundProvider source; private readonly IAsyncSoundProvider source;
private readonly int spf; private readonly int spf;
/// <summary> /// <summary>
/// </summary> /// </summary>
/// <param name="spf">number of sample pairs to request and provide on each GetSamples() call</param> /// <param name="spf">number of sample pairs to request and provide on each GetSamples() call</param>
public FakeSyncSound(ISoundProvider source, int spf) public FakeSyncSound(IAsyncSoundProvider source, int spf)
{ {
this.source = source; this.source = source;
this.spf = spf; this.spf = spf;

View File

@ -28,9 +28,9 @@ namespace BizHawk.Emulation.Common
* that and then bypass the BufferedAsync. * that and then bypass the BufferedAsync.
*/ */
public sealed class BufferedAsync : ISoundProvider public sealed class BufferedAsync : IAsyncSoundProvider
{ {
public ISoundProvider BaseSoundProvider; public IAsyncSoundProvider BaseSoundProvider;
readonly Queue<short> buffer = new Queue<short>(4096); readonly Queue<short> buffer = new Queue<short>(4096);

View File

@ -5,7 +5,7 @@ namespace BizHawk.Emulation.Common
/// <summary> /// <summary>
/// implements a DC block filter on top of an ISoundProvider. rather simple. /// implements a DC block filter on top of an ISoundProvider. rather simple.
/// </summary> /// </summary>
sealed public class DCFilter : ISoundProvider, ISyncSoundProvider sealed public class DCFilter : IAsyncSoundProvider, ISyncSoundProvider
{ {
/* /*
* A note about accuracy: * A note about accuracy:
@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Common
* Analog output hardware ALWAYS has dc blocking caps. * Analog output hardware ALWAYS has dc blocking caps.
*/ */
ISoundProvider input; IAsyncSoundProvider input;
ISyncSoundProvider syncinput; ISyncSoundProvider syncinput;
int latchL = 0; int latchL = 0;
@ -35,7 +35,7 @@ namespace BizHawk.Emulation.Common
int depth; int depth;
public static DCFilter AsISoundProvider(ISoundProvider input, int filterwidth) public static DCFilter AsISoundProvider(IAsyncSoundProvider input, int filterwidth)
{ {
if (input == null) if (input == null)
throw new ArgumentNullException(); throw new ArgumentNullException();
@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Common
return new DCFilter(null, null, filterwidth); 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) if (filterwidth < 8 || filterwidth > 65536)
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();
@ -104,13 +104,13 @@ namespace BizHawk.Emulation.Common
} }
} }
void ISoundProvider.GetSamples(short[] samples) void IAsyncSoundProvider.GetSamples(short[] samples)
{ {
input.GetSamples(samples); input.GetSamples(samples);
PushThroughSamples(samples, samples.Length); PushThroughSamples(samples, samples.Length);
} }
void ISoundProvider.DiscardSamples() void IAsyncSoundProvider.DiscardSamples()
{ {
input.DiscardSamples(); input.DiscardSamples();
} }

View File

@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Common
/// <summary> /// <summary>
/// uses Metaspu to have an ISyncSoundProvider input to a ISoundProvider /// uses Metaspu to have an ISyncSoundProvider input to a ISoundProvider
/// </summary> /// </summary>
public class MetaspuAsync : ISoundProvider public class MetaspuAsync : IAsyncSoundProvider
{ {
private readonly ISynchronizingAudioBuffer buffer; private readonly ISynchronizingAudioBuffer buffer;
private readonly ISyncSoundProvider input; private readonly ISyncSoundProvider input;
@ -32,7 +32,7 @@ namespace BizHawk.Emulation.Common
} }
} }
public class MetaspuSoundProvider : ISoundProvider public class MetaspuSoundProvider : IAsyncSoundProvider
{ {
public ISynchronizingAudioBuffer buffer; public ISynchronizingAudioBuffer buffer;
public MetaspuSoundProvider(ESynchMethod method) public MetaspuSoundProvider(ESynchMethod method)
@ -46,7 +46,7 @@ namespace BizHawk.Emulation.Common
} }
private readonly short[] pullBuffer = new short[1470]; private readonly short[] pullBuffer = new short[1470];
public void PullSamples(ISoundProvider source) public void PullSamples(IAsyncSoundProvider source)
{ {
Array.Clear(pullBuffer, 0, 1470); Array.Clear(pullBuffer, 0, 1470);
source.GetSamples(pullBuffer); source.GetSamples(pullBuffer);

View File

@ -5,13 +5,13 @@ namespace BizHawk.Emulation.Common
/// <summary> /// <summary>
/// An interface that extends a sound provider to provide mixing capabilities through the SoundMixer class /// An interface that extends a sound provider to provide mixing capabilities through the SoundMixer class
/// </summary> /// </summary>
public interface IMixedSoundProvider : ISoundProvider public interface IMixedSoundProvider : IAsyncSoundProvider
{ {
int MaxVolume { get; set; } int MaxVolume { get; set; }
} }
// This is a straightforward class to mix/chain multiple ISoundProvider sources. // This is a straightforward class to mix/chain multiple ISoundProvider sources.
public sealed class SoundMixer : ISoundProvider public sealed class SoundMixer : IAsyncSoundProvider
{ {
private readonly List<IMixedSoundProvider> SoundProviders; private readonly List<IMixedSoundProvider> SoundProviders;

View File

@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Calculators
{ {
public IEmulatorServiceProvider ServiceProvider { get; private set; } public IEmulatorServiceProvider ServiceProvider { get; private set; }
public ISoundProvider SoundProvider public IAsyncSoundProvider SoundProvider
{ {
get { return NullSound.SilenceProvider; } get { return NullSound.SilenceProvider; }
} }

View File

@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
public IEmulatorServiceProvider ServiceProvider { get; private set; } public IEmulatorServiceProvider ServiceProvider { get; private set; }
[FeatureNotImplemented] [FeatureNotImplemented]
public ISoundProvider SoundProvider public IAsyncSoundProvider SoundProvider
{ {
get { return null; } get { return null; }
} }

View File

@ -139,7 +139,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }
[SaveState.DoNotSave] [SaveState.DoNotSave]
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
[SaveState.DoNotSave] [SaveState.DoNotSave]
public ISyncSoundProvider SyncSoundProvider { get; private set; } public ISyncSoundProvider SyncSoundProvider { get; private set; }
[SaveState.DoNotSave] [SaveState.DoNotSave]

View File

@ -6,7 +6,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
{ {
public sealed partial class Sid : ISoundProvider, ISyncSoundProvider public sealed partial class Sid : IAsyncSoundProvider, ISyncSoundProvider
{ {
public int MaxVolume public int MaxVolume
{ {

View File

@ -80,7 +80,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public CoreComm CoreComm { get; private set; } public CoreComm CoreComm { get; private set; }
public ISoundProvider SoundProvider { get { return _dcfilter; } } public IAsyncSoundProvider SoundProvider { get { return _dcfilter; } }
// todo: make this not so ugly // todo: make this not so ugly
public ISyncSoundProvider SyncSoundProvider public ISyncSoundProvider SyncSoundProvider

View File

@ -7,7 +7,7 @@ using System.Numerics;
namespace BizHawk.Emulation.Cores.Atari.Atari2600 namespace BizHawk.Emulation.Cores.Atari.Atari2600
{ {
// Emulates the TIA // Emulates the TIA
public partial class TIA : IVideoProvider, ISoundProvider public partial class TIA : IVideoProvider, IAsyncSoundProvider
{ {
#region palette #region palette

View File

@ -209,7 +209,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
public ISyncSoundProvider SyncSoundProvider { get { return avProvider; } } public ISyncSoundProvider SyncSoundProvider { get { return avProvider; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
MyAVProvider avProvider = new MyAVProvider(); MyAVProvider avProvider = new MyAVProvider();

View File

@ -198,7 +198,7 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx
short[] soundbuff = new short[2048]; short[] soundbuff = new short[2048];
int numsamp; int numsamp;
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider { get { return this; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -167,7 +167,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision
public string SystemId { get { return "Coleco"; } } public string SystemId { get { return "Coleco"; } }
public GameInfo game; public GameInfo game;
public CoreComm CoreComm { get; private set; } public CoreComm CoreComm { get; private set; }
public ISoundProvider SoundProvider { get { return PSG; } } public IAsyncSoundProvider SoundProvider { get { return PSG; } }
public string BoardName { get { return null; } } public string BoardName { get { return null; } }

View File

@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
private DCFilter _dcfilter; private DCFilter _dcfilter;
public ISoundProvider SoundProvider public IAsyncSoundProvider SoundProvider
{ {
get { return _dcfilter; } get { return _dcfilter; }
} }

View File

@ -5,7 +5,7 @@ using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Intellivision namespace BizHawk.Emulation.Cores.Intellivision
{ {
public sealed class PSG : ISoundProvider public sealed class PSG : IAsyncSoundProvider
{ {
public ushort[] Register = new ushort[16]; public ushort[] Register = new ushort[16];

View File

@ -204,7 +204,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
{ {
nsamp = 0; nsamp = 0;
} }
public ISoundProvider SoundProvider { get { throw new InvalidOperationException(); } } public IAsyncSoundProvider SoundProvider { get { throw new InvalidOperationException(); } }
public ISyncSoundProvider SyncSoundProvider { get { return this; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -293,7 +293,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
short[] soundbuffer; short[] soundbuffer;
GCHandle soundhandle; GCHandle soundhandle;
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider { get { return this; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -232,7 +232,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
short[] soundbuff = new short[2048]; short[] soundbuff = new short[2048];
int numsamp; int numsamp;
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider { get { return this; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -569,7 +569,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
#region ISoundProvider #region ISoundProvider
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider { get { return this; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -89,7 +89,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
public IEmulatorServiceProvider ServiceProvider { get; private set; } 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 ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -268,7 +268,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
public DisplayType Region { get { return _display_type; } } 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; } } public ISyncSoundProvider SyncSoundProvider { get { return _audioProvider.Resampler; } }

View File

@ -79,7 +79,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
magicSoundProvider = null; magicSoundProvider = null;
} }
class MagicSoundProvider : ISoundProvider, ISyncSoundProvider, IDisposable class MagicSoundProvider : IAsyncSoundProvider, ISyncSoundProvider, IDisposable
{ {
BlipBuffer blip; BlipBuffer blip;
NES nes; NES nes;

View File

@ -334,7 +334,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
} }
MyVideoProvider videoProvider; MyVideoProvider videoProvider;
public ISoundProvider SoundProvider { get { return magicSoundProvider; } } public IAsyncSoundProvider SoundProvider { get { return magicSoundProvider; } }
public ISyncSoundProvider SyncSoundProvider { get { return magicSoundProvider; } } public ISyncSoundProvider SyncSoundProvider { get { return magicSoundProvider; } }
public bool StartAsyncSound() { return true; } public bool StartAsyncSound() { return true; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -322,7 +322,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
#region SoundProvider #region SoundProvider
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider { get { return this; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -1300,7 +1300,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
resampler.EnqueueSample((short)left, (short)right); 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 ISyncSoundProvider SyncSoundProvider { get { return resampler; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -75,7 +75,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES9X
#region ISyncSoundProvider #region ISyncSoundProvider
private short[] _sbuff = new short[2048]; 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 ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -406,8 +406,8 @@ namespace BizHawk.Emulation.Cores.PCEngine
public CoreComm CoreComm { get; private set; } public CoreComm CoreComm { get; private set; }
ISoundProvider soundProvider; IAsyncSoundProvider soundProvider;
public ISoundProvider SoundProvider public IAsyncSoundProvider SoundProvider
{ {
get { return soundProvider; } get { return soundProvider; }
} }

View File

@ -301,7 +301,7 @@ namespace BizHawk.Emulation.Cores.Sega.Genesis
public CoreComm CoreComm { get; private set; } public CoreComm CoreComm { get; private set; }
public ISoundProvider SoundProvider public IAsyncSoundProvider SoundProvider
{ {
get { return SoundMixer; } get { return SoundMixer; }
} }

View File

@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
{ {
public IEmulatorServiceProvider ServiceProvider { get; private set; } public IEmulatorServiceProvider ServiceProvider { get; private set; }
public ISoundProvider SoundProvider public IAsyncSoundProvider SoundProvider
{ {
get { return ActiveSoundProvider; } get { return ActiveSoundProvider; }
} }

View File

@ -118,7 +118,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
SoundMixer = new SoundMixer(YM2413, PSG); SoundMixer = new SoundMixer(YM2413, PSG);
if (HasYM2413 && game["WhenFMDisablePSG"]) if (HasYM2413 && game["WhenFMDisablePSG"])
SoundMixer.DisableSource(PSG); SoundMixer.DisableSource(PSG);
ActiveSoundProvider = HasYM2413 ? (ISoundProvider)SoundMixer : PSG; ActiveSoundProvider = HasYM2413 ? (IAsyncSoundProvider)SoundMixer : PSG;
SystemRam = new byte[0x2000]; SystemRam = new byte[0x2000];
@ -310,7 +310,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
else if (port == 0xF2 && HasYM2413) YM2413.DetectionValue = value; else if (port == 0xF2 && HasYM2413) YM2413.DetectionValue = value;
} }
private ISoundProvider ActiveSoundProvider; private IAsyncSoundProvider ActiveSoundProvider;
private string _region; private string _region;
private string RegionStr private string RegionStr

View File

@ -364,7 +364,7 @@ namespace BizHawk.Emulation.Cores.Sega.Saturn
} }
public void DiscardSamples() { } public void DiscardSamples() { }
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider { get { return this; } } public ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
{ {
public IEmulatorServiceProvider ServiceProvider { get; private set; } public IEmulatorServiceProvider ServiceProvider { get; private set; }
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider public ISyncSoundProvider SyncSoundProvider
{ {

View File

@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx64
{ {
public IEmulatorServiceProvider ServiceProvider { get; private set; } public IEmulatorServiceProvider ServiceProvider { get; private set; }
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider public ISyncSoundProvider SyncSoundProvider
{ {

View File

@ -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 ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -861,7 +861,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
private short[] sbuff = new short[1611 * 2]; //need this for pal private short[] sbuff = new short[1611 * 2]; //need this for pal
private int sbuffcontains = 0; 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 ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -221,7 +221,7 @@ namespace BizHawk.Emulation.Cores.WonderSwan
private short[] sbuff = new short[1536]; private short[] sbuff = new short[1536];
private int sbuffcontains = 0; 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 ISyncSoundProvider SyncSoundProvider { get { return this; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }

View File

@ -737,7 +737,7 @@ namespace BizHawk.Emulation.Cores
#region ISoundProvider #region ISoundProvider
public ISoundProvider SoundProvider { get { return null; } } public IAsyncSoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider { get { return resampler; } } public ISyncSoundProvider SyncSoundProvider { get { return resampler; } }
public bool StartAsyncSound() { return false; } public bool StartAsyncSound() { return false; }
public void EndAsyncSound() { } public void EndAsyncSound() { }