Example #1
0
        /// <summary>
        /// Sleeps for the specified amount of time while calling FrameworkDispatcher.Update() every 10 ms.
        /// </summary>
        private static void SleepWhileDispatching(int ms)
        {
            int cycles = ms / 10;

            for (int i = 0; i < cycles; i++)
            {
#if XNA
                FrameworkDispatcher.Update();
#else
                DynamicSoundEffectInstanceManager.UpdatePlayingInstances();
#endif
                Thread.Sleep(10);
            }
        }
Example #2
0
        internal void DoUpdate(GameTime gameTime)
        {
            AssertNotDisposed();
            if (Platform.BeforeUpdate(gameTime))
            {
                // Once per frame, we need to check currently
                // playing sounds to see if they've stopped,
                // and return them back to the pool if so.
                SoundEffectInstancePool.Update();

                DynamicSoundEffectInstanceManager.UpdatePlayingInstances();

                Update(gameTime);

                //The TouchPanel needs to know the time for when touches arrive
                TouchPanelState.CurrentTimestamp = gameTime.TotalGameTime;
            }
        }
 private static void DoUpdate()
 {
     DynamicSoundEffectInstanceManager.UpdatePlayingInstances();
     SoundEffectInstancePool.Update();
     Microphone.UpdateMicrophones();
 }