WP7 recording. update has not been called. regular frameworkdispatcher. update CILS are necessary for fire and forget sound effects and framework events to function correctly ., if you use the xNa framework from an application, do not execute the game class. For example, if you use the Silverlight application in a Windows Phone application
". Update has not been called. regular frameworkdispatcher. update CILS are necessary for fire and forget sound effects and framework events to function correctly. ", I found the information to say this:
If you use an xNa framework from an application and do not execute a game class, for example, a Windows Phone application uses a Silverlight application model, you must call your frameworkdispatcher in the message queue of the xNa framework. update method to send messages. You can do this by repeating every frame of a timer, or implementing a dispatchertimer tick event handler iapplicationservice interface.
Method 1: Call the xNa class before adding
DispatcherTimer timer =
new DispatcherTimer();
timer.Interval = TimeSpan.FromMilliseconds(33);
timer.Tick +=
delegate
{ try
{ FrameworkDispatcher.Update(); }
catch { } };
timer.Start(); |
2:
public class XnaAsyncDispatcher : IApplicationService{ private readonly DispatcherTimer _frameworkDispatcherTimer; public XnaAsyncDispatcher(TimeSpan dispatchInterval) { FrameworkDispatcher.Update(); _frameworkDispatcherTimer = new DispatcherTimer(); _frameworkDispatcherTimer.Tick += FrameworkDispatcherTimer_Tick; _frameworkDispatcherTimer.Interval = dispatchInterval; } void IApplicationService.StartService(ApplicationServiceContext context) { _frameworkDispatcherTimer.Start(); } void IApplicationService.StopService() { _frameworkDispatcherTimer.Stop(); } private static void FrameworkDispatcherTimer_Tick(object sender, EventArgs e) { FrameworkDispatcher.Update(); }}