We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sound update
blaze-snes/BlazeSnes/Pages/Index.razor
Line 354 in 6de04b7
} // start emulation this.emulationCancel = new CancellationTokenSource(); await OnEmulate(this.emulationCancel.Token); await base.OnAfterRenderAsync(firstRender); } private async Task OnEmulate(CancellationToken cancelToken) { for(this.counter = 0; !cancelToken.IsCancellationRequested; this.counter++) { var sw = Stopwatch.StartNew(); // TODO: Emulate here // TODO: sound update // GCに移動されないよう固定してJSに渡す。終わったら捨てる var gch = System.Runtime.InteropServices.GCHandle.Alloc(frameBuffer, System.Runtime.InteropServices.GCHandleType.Pinned); var pinnedAddr = gch.AddrOfPinnedObject(); var jsRuntime = JSRuntime as Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime; jsRuntime.InvokeUnmarshalled<IntPtr,string>("drawEmulatorCanvas", pinnedAddr); gch.Free(); // Emulation info sw.Stop(); var elapsedMs = sw.ElapsedMilliseconds > 0 ? sw.ElapsedMilliseconds : 1; this.actualFps = 1000.0f / (float)elapsedMs; @* Console.WriteLine($"counter:{counter} elapsed:{elapsedMs} actualFps:{actualFps}"); *@ // FPS Control var idealMs = 1000.0f / this.FPS; if (idealMs > elapsedMs) { var diffMs = idealMs - elapsedMs; await Task.Delay((int)diffMs); } } } private void OnCanvasMouseMove(MouseEventArgs e) { } ndex f6f6906..6413d56 100644 ++ b/BlazeSnes/_Imports.razor
934e7b14217dece533fd63ad0c7aa2b22e66013e
The text was updated successfully, but these errors were encountered:
No branches or pull requests
sound update
blaze-snes/BlazeSnes/Pages/Index.razor
Line 354 in 6de04b7
934e7b14217dece533fd63ad0c7aa2b22e66013e
The text was updated successfully, but these errors were encountered: