public WaveDevices(Waverly _signals) { signals = _signals; //input devices int deviceID; uint incount = waveInGetNumDevs(); inputDeviceNames = new List <String>(); inputDeviceNames.Add("no input"); WAVEINCAPS inCaps = new WAVEINCAPS(); for (deviceID = 0; deviceID < incount; deviceID++) { MMRESULT result = waveInGetDevCaps(deviceID, ref inCaps, Marshal.SizeOf(inCaps)); String inName = inCaps.szPname; inputDeviceNames.Add(inName); } //output devices uint outcount = waveOutGetNumDevs(); outputDeviceNames = new List <String>(); outputDeviceNames.Add("no output"); WAVEOUTCAPS outCaps = new WAVEOUTCAPS(); for (deviceID = 0; deviceID < outcount; deviceID++) { MMRESULT result = waveOutGetDevCaps(deviceID, ref outCaps, Marshal.SizeOf(outCaps)); String outName = outCaps.szPname; outputDeviceNames.Add(outName); } }
static extern MMRESULT waveOutGetDevCaps(int hwo, ref WAVEOUTCAPS pwoc, int cbwoc);