Пример #1
0
 /// <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())));
 }
Пример #2
0
 public static double VsyncRate(this IEmulator core)
 {
     return(core.VsyncNumerator() / (double)core.VsyncDenominator());
 }