Ejemplo n.º 1
0
        public void SetAudioOutputDevice()
        {
            foreach (AudioOutputModuleInfo module in m_factory.AudioOutputModules)
            {
                List <AudioOutputDeviceInfo> info = m_factory.GetAudioOutputDevices(module).ToList();

                foreach (var s in info)
                {
                    if (Player.IsAsioInitialized)
                    {
                        if (s.Longname.Contains("VB-Audio Virtual"))
                        {
                            //Console.WriteLine(s.Id + " " + s.Longname);
                            m_player.SetAudioOutputModuleAndDevice(module, s);
                            m_isVbcableInstalled = true;
                            LoadDefaultVideoBG();
                            return;
                        }

                        m_isVbcableInstalled = false;
                    }
                    if (Player.IsBassInitialized || Player.IsWasapiInitialized)
                    {
                        if (s.Longname.Contains(Player.DefaultDeviceLongName.Substring(0, 31)))
                        {
                            m_player.SetAudioOutputModuleAndDevice(module, s);
                            LoadDefaultVideoBG();
                        }
                    }
                }
            }
        }