foreach (SoundCaptureDevice device in SoundCaptureDevice.AllAvailable)
{
devicesCmb.Items.Add(device);
Console.WriteLine(i);
}
// SoundCaptureDevice.AllAvailable 这步很慢
// 这跟下两个代码 原本在A项目里的主界面被调用 正常
// 新建一个项目 引入A项目 按钮事件中 调用 a项目的主界面
// 就一直卡在 SoundCaptureDevice.AllAvailable
public struct SoundCaptureDevice : IEquatable<SoundCaptureDevice>
{
public static readonly SoundCaptureDevice Default;
public SoundCaptureDevice(string description, Guid driverGuid, string moduleName);
public static IEnumerable<SoundCaptureDevice> AllAvailable { get; }
public string Description { get; }
public Guid DriverGuid { get; }
public string ModuleName { get; }
public bool Equals(SoundCaptureDevice other);
public override bool Equals(object obj);
public override int GetHashCode();
public override string ToString();
public static bool operator ==(SoundCaptureDevice device1, SoundCaptureDevice device2);
public static bool operator !=(SoundCaptureDevice device1, SoundCaptureDevice device2);
}
86 64
– 九剑.sk 6年前4.5 4.0