예제 #1
0
파일: OutputDevice.cs 프로젝트: desla/AS
        /// <summary>
        /// Получить описание системного устройства.
        /// </summary>
        /// <param name="aDeviceId">Идентификатор устройства.</param>
        /// <param name="aDeviceName">Название устройства.</param>
        /// <param name="aChannelCount">Количество каналов устройства.</param>
        private static void GetDeviceCaps(int aDeviceId, out string aDeviceName, out int aChannelCount)
        {
            var wOutCaps = new WAVEOUTCAPS();
            NativeMethods.waveOutGetDevCaps(new UIntPtr((uint)aDeviceId),
                                            ref wOutCaps,
                                            (uint)Marshal.SizeOf(typeof(WAVEOUTCAPS)));

            aDeviceName = wOutCaps.SzPname;
            aChannelCount = wOutCaps.WChannels;
        }
예제 #2
0
파일: DllImports.cs 프로젝트: desla/AS
 public static extern uint waveOutGetDevCaps(UIntPtr hWaveOut, ref WAVEOUTCAPS pwoc, uint cbwoc);