public override int RenderVisualization()
        {
            ////if (VisualizationWindow.InvokeRequired)
            ////{
            ////    ThreadSafeRenderDelegate d = new ThreadSafeRenderDelegate(RenderVisualization);
            ////    return (int)VisualizationWindow.Invoke(d);
            ////}

            try
            {
                if (VisualizationWindow == null || !VisualizationWindow.Visible)
                {
                    return(0);
                }

                int sleepMS = SoundSpectrumInterop.Render();
                return(sleepMS);
            }

            catch (Exception ex)
            {
                Console.WriteLine("Visualization: {0} Render Exception: {1}", VizPluginInfo.Name, ex);
                return(0);
            }
        }
        public override int PreRenderVisualization()
        {
            // The first Render call can take a significant amount of time to return.
            // Consider calling this method from a worker thread to prevent the main thread
            // from blocking while the SoundSpectrum engine does it's own internal initialization.
            //if (VisualizationWindow.InvokeRequired)
            //{
            //    ThreadSafeRenderDelegate d = new ThreadSafeRenderDelegate(PreRenderVisualization);
            //    return (int)VisualizationWindow.Invoke(d);
            //}

            try
            {
                // Soundspectrum Graphics always show the cursor, so let's hide it here
                if (GUIGraphicsContext.Fullscreen && _autoHideMouse)
                {
                    Cursor.Hide();
                }

                return(SoundSpectrumInterop.Render());
            }

            catch
            {
                return(0);
            }
        }