public static void Update()
        {
            /* Updates the status of various framework components
             * (such as power state and media), and raises related events.
             */
            lock (Streams)
            {
                for (int i = 0; i < Streams.Count; i += 1)
                {
                    DynamicSoundEffectInstance dsfi = Streams[i];
                    dsfi.Update();
                    if (dsfi.IsDisposed)
                    {
                        i -= 1;
                    }
                }
            }
            if (Microphone.micList != null)
            {
                for (int i = 0; i < Microphone.micList.Count; i += 1)
                {
                    Microphone.micList[i].CheckBuffer();
                }
            }

            MediaPlayer.Update();
            if (ActiveSongChanged)
            {
                MediaPlayer.OnActiveSongChanged();
                ActiveSongChanged = false;
            }
            if (MediaStateChanged)
            {
                MediaPlayer.OnMediaStateChanged();
                MediaStateChanged = false;
            }

            if (TouchPanel.TouchDeviceExists)
            {
                TouchPanel.Update();
            }
        }