예제 #1
0
        public Irrklang()
        {
            //gets all SoundDevice and write it to the Enum Pin
            var s = new string[FDevice.DeviceCount];

            for (int a = 0; a < FDevice.DeviceCount; ++a)
            {
                try
                {
                    FDeviceSelect.Add(FDevice.getDeviceDescription(a), a);
                    s[a] = FDevice.getDeviceDescription(a);
                }
                catch (Exception ex)
                {
                    FLogger.Log(ex);
                }
            }
            EnumManager.UpdateEnum("DeviceName", s[0], s);
            EnumManager.UpdateEnum("PlayMode", "3D", FPlayModeArray);
        }
예제 #2
0
파일: Config.cs 프로젝트: de1mos242/Jukebox
        private string DeviceDialog()
        {
            Console.WriteLine("Output devices: ");
            ISoundDeviceList outputDevices = new ISoundDeviceList(SoundDeviceListType.PlaybackDevice);

            for (int i = 0; i < outputDevices.DeviceCount; i++)
            {
                Console.WriteLine(i.ToString() + ": " + outputDevices.getDeviceDescription(i));
            }
            Console.Write("Choose device (0): ");
            var    deviceString = Console.ReadLine();
            int    deviceIndex  = deviceString.Length != 1 ? 0 : int.Parse(deviceString);
            string deviceID     = outputDevices.getDeviceID(deviceIndex);

            return(deviceID);
        }
예제 #3
0
파일: Config.cs 프로젝트: de1mos242/Jukebox
 private string DeviceDialog()
 {
     Console.WriteLine("Output devices: ");
     ISoundDeviceList outputDevices = new ISoundDeviceList(SoundDeviceListType.PlaybackDevice);
     for (int i = 0; i < outputDevices.DeviceCount; i++)
     {
         Console.WriteLine(i.ToString() + ": " + outputDevices.getDeviceDescription(i));
     }
     Console.Write("Choose device (0): ");
     var deviceString = Console.ReadLine();
     int deviceIndex = deviceString.Length != 1 ? 0 : int.Parse(deviceString);
     string deviceID = outputDevices.getDeviceID(deviceIndex);
     return deviceID;
 }
        private void Form1_Load(object sender, EventArgs e)
        {
            //Add each device to a combo box.
            for (int i = 0; i < dlist.DeviceCount; i++)
            {
                OutputDevice.Items.Add(dlist.getDeviceDescription(i) + "\n");

                // select last one
                if (dlist.getDeviceID(i) == Properties.Settings.Default.DeviceID)
                {
                    OutputDevice.SelectedItem = dlist.getDeviceDescription(i) + "\n";
                }
            }

            // upgrade settings from previous versions
            if (Properties.Settings.Default.UpdateSettings)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.UpdateSettings = false;
                Properties.Settings.Default.Save();
            }

            // load previous settings
            // gains
            gxGain.Value = Properties.Settings.Default.gxGain;
            gyGain.Value = Properties.Settings.Default.gyGain;
            gzGain.Value = Properties.Settings.Default.gzGain;

            rollGain.Value  = Properties.Settings.Default.rollGain;
            pitchGain.Value = Properties.Settings.Default.pitchGain;
            yawGain.Value   = Properties.Settings.Default.yawGain;

            LFShockGain.Value = Properties.Settings.Default.LFShockGain;
            RFShockGain.Value = Properties.Settings.Default.RFShockGain;
            LRShockGain.Value = Properties.Settings.Default.LRShockGain;
            RRShockGain.Value = Properties.Settings.Default.RRShockGain;

            // Enables
            gxLeftChannelEnable.Checked  = Properties.Settings.Default.gxLeftChannelEnable;
            gxRightChannelEnable.Checked = Properties.Settings.Default.gxRightChannelEnable;

            gyLeftChannelEnable.Checked  = Properties.Settings.Default.gyLeftChannelEnable;
            gyRightChannelEnable.Checked = Properties.Settings.Default.gyRightChannelEnable;

            gzLeftChannelEnable.Checked  = Properties.Settings.Default.gzLeftChannelEnable;
            gzRightChannelEnable.Checked = Properties.Settings.Default.gzRightChannelEnable;

            rollLeftChannelEnable.Checked  = Properties.Settings.Default.rollLeftChannelEnable;
            rollRightChannelEnable.Checked = Properties.Settings.Default.rollRightChannelEnable;

            pitchLeftChannelEnable.Checked  = Properties.Settings.Default.pitchLeftChannelEnable;
            pitchRightChannelEnable.Checked = Properties.Settings.Default.pitchRightChannelEnable;

            yawLeftChannelEnable.Checked  = Properties.Settings.Default.yawLeftChannelEnable;
            yawRightChannelEnable.Checked = Properties.Settings.Default.yawRightChannelEnable;

            LFLeftChannelEnable.Checked  = Properties.Settings.Default.LFLeftChannelEnable;
            LFRightChannelEnable.Checked = Properties.Settings.Default.LFRightChannelEnable;

            RFLeftChannelEnable.Checked  = Properties.Settings.Default.RFLeftChannelEnable;
            RFRightChannelEnable.Checked = Properties.Settings.Default.RFRightChannelEnable;

            LRLeftChannelEnable.Checked  = Properties.Settings.Default.LRLeftChannelEnable;
            LRRightChannelEnable.Checked = Properties.Settings.Default.LRRightChannelEnable;

            RRLeftChannelEnable.Checked  = Properties.Settings.Default.RRLeftChannelEnable;
            RRRightChannelEnable.Checked = Properties.Settings.Default.RRRightChannelEnable;
        }