private bool Initialize()
        {
            bool result = true;
            if (!_Initialized)
            {
                Log.Info("WMPlayer: Initializing player ...");

                LoadSettings();

                _AxWMP = new AxWindowsMediaPlayer();
                GUIGraphicsContext.form.SuspendLayout();
                GUIGraphicsContext.form.Controls.Add(_AxWMP);
                GUIGraphicsContext.form.ResumeLayout(false);

                _AxWMP.BeginInit();

                _AxWMP.Name = "AxWindowsMediaPlayer";
                _AxWMP.Visible = false;
                _AxWMP.TabIndex = 0;
                _AxWMP.TabStop = false;
                _AxWMP.Location = new Point(0, 0);
                _AxWMP.Size = new Size(1, 1);
                // Only in "full" mode advanced Visualizations are supported.
                // The controls are hidden by positioning them outside the window.
                // See also Process().
                _AxWMP.uiMode = "full";
                _AxWMP.settings.autoStart = false;
                _AxWMP.settings.enableErrorDialogs = false;
                _AxWMP.settings.volume = 100;
                _AxWMP.network.bufferingTime = _BufferTime;
                _AxWMP.windowlessVideo = false;
                _AxWMP.enableContextMenu = false;
                _AxWMP.Ctlenabled = false;
                _AxWMP.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(OnPlayStateChange);
                _AxWMP.Buffering += new AxWMPLib._WMPOCXEvents_BufferingEventHandler(OnBuffering);
                _AxWMP.EndInit();

                _SavedFullScreenHandler = g_Player.ShowFullScreenWindowVideo;
                g_Player.ShowFullScreenWindowVideo = FullScreenHandler;

                GUIGraphicsContext.OnNewAction += new OnActionHandler(OnNewAction);
            GUIGraphicsContext.form.Disposed += new EventHandler(OnAppFormDisposed);
            _Timer.Elapsed += new System.Timers.ElapsedEventHandler(_Timer_Elapsed);

                if (result)
                {
                    Log.Info("WMPlayer: Initializing complete.");
                    _Initialized = true;
                }
            }
            return result;
        }
        private bool Initialize()
        {
            Log.Debug("PureAudio: Initialize() called...");

              bool result = true;
              if (!_Initialized)
              {
            Log.Info("PureAudio: Plugin version: {0}", VersionNumber);
            Log.Info("PureAudio: Initializing player ...");

            _BassPlayer = new BASSPlayer();

            LoadSettings();
            _BassPlayer.DebugMode = _DebugMode;

            _BassPlayer.Ended += new BASSPlayer.EndedDelegate(_BassPlayer_Ended);
            _BassPlayer.Stopped += new BASSPlayer.StoppedDelegate(_BassPlayer_Stopped);
            _BassPlayer.StreamTagsChanged += new BASSPlayer.StreamTagsChangedDelegate(_BassPlayer_StreamTagsChanged);
            _BassPlayer.MetaStreamTagsChanged += new BASSPlayer.MetaStreamTagsChangedDelegate(_BassPlayer_MetaStreamTagsChanged);
            _BassPlayer.SessionStopped += new BASSPlayer.SessionStoppedDelegate(_BassPlayer_SessionStopped);
            _BassPlayer.SessionStarted += new BASSPlayer.SessionStartedDelegate(_BassPlayer_SessionStarted);
            _BassPlayer.MonitorProcess += new BASSPlayer.MonitorProcessDelegate(_BassPlayer_MonitorProcess);
            _BassPlayer.WaitCursorRequested += new BASSPlayer.WaitCursorRequestedDelegate(_BassPlayer_WaitCursorRequested);

            result = _BassPlayer.Initialize();
            if (result)
            {
              _SavedFullScreenHandler = g_Player.ShowFullScreenWindowVideo;
              g_Player.ShowFullScreenWindowVideo = new g_Player.ShowFullScreenWindowHandler(FullScreenHandler);

              GUIGraphicsContext.form.Disposed += new EventHandler(OnAppFormDisposed);
              GUIGraphicsContext.OnNewAction += new OnActionHandler(OnNewAction);

              VisualizationFactory vizFactory = VisualizationFactory.Create(_BassPlayer.Profile);
              _VizWindow = vizFactory.GetVisualizationWindow();

              // VizTest
              if (_VizWindow != null)
              {
            _VizWindow.Name = VizWindowName;
            _VizWindow.Visible = false;

              }

              Log.Info("PureAudio: Initializing complete.");

              g_Player.PlayBackEnded += new g_Player.EndedHandler(g_Player_PlayBackEnded);

              _Initialized = true;
            }
              }
              return result;
        }