/// <summary> /// returns the core's SoundProvider, or a suitable dummy provider /// </summary> public static ISoundProvider AsSoundProviderOrDefault(this IEmulator core) { return(core.ServiceProvider.GetService <ISoundProvider>() ?? CachedNullSoundProviders.GetValue(core, e => new NullSound(core.VsyncNumerator(), core.VsyncDenominator()))); }
public static double VsyncRate(this IEmulator core) { return(core.VsyncNumerator() / (double)core.VsyncDenominator()); }