Example #1
0
        // Constructor
        public SoundsManager()
        {
            sounds = new Dictionary <string, SoundPlayer>();

            // Find all devices
            int numdevices = waveOutGetNumDevs();

            devices = new WaveOutCaps[numdevices];
            for (int i = 0; i < numdevices; i++)
            {
                devices[i] = new WaveOutCaps();
                waveOutGetDevCaps(i, ref devices[i], Marshal.SizeOf(typeof(WaveOutCaps)));
            }

            // Determine primary and secondary audio device to use
            if (General.Settings.LiveEnvironment)
            {
                primarydevice   = FindDeviceName("SigmaTel");
                secondarydevice = FindDeviceName("SB X-Fi");
            }
            else
            {
                primarydevice   = FindDeviceName("Realtek");
                secondarydevice = FindDeviceName("Realtek");
            }
        }
Example #2
0
        // Constructor
        public SoundsManager()
        {
            sounds = new Dictionary<string, SoundPlayer>();

            // Find all devices
            int numdevices = waveOutGetNumDevs();
            devices = new WaveOutCaps[numdevices];
            for(int i = 0; i < numdevices; i++)
            {
                devices[i] = new WaveOutCaps();
                waveOutGetDevCaps(i, ref devices[i], Marshal.SizeOf(typeof(WaveOutCaps)));
            }

            // Determine primary and secondary audio device to use
            if(General.Settings.LiveEnvironment)
            {
                primarydevice = FindDeviceName("SigmaTel");
                secondarydevice = FindDeviceName("SB X-Fi");
            }
            else
            {
                primarydevice = FindDeviceName("Realtek");
                secondarydevice = FindDeviceName("Realtek");
            }
        }
Example #3
0
 public static extern int waveOutGetDevCaps(int uDeviceID, ref WaveOutCaps lpCaps, int uSize);
Example #4
0
 public static extern int waveOutGetDevCaps(int uDeviceID, ref WaveOutCaps lpCaps, int uSize);