static public void Check() { _drivers = InstalledDriver.Installed; if (_drivers.Count > 0) { ASIODriver _drv = SelectDriver(_drivers[0]); if (_drv != null) { int nInChannels, nOutChannels; _drv.getChannels(out nInChannels, out nOutChannels); string message = _drv.getErrorMessage(); _inInfoChannels.Clear(); _inchannels.Clear(); for (int i = 0; i < nInChannels; i++) { _inInfoChannels.Add((_drv.getChannelInfo(i, true))); _inchannels.Add((_drv.getChannelInfo(i, true)).name); } _outInfoChannels.Clear(); _outchannels.Clear(); for (int i = 0; i < nOutChannels; i++) { _outInfoChannels.Add((_drv.getChannelInfo(i, false))); _outchannels.Add((_drv.getChannelInfo(i, false)).name); } _drv.ReleaseComASIODriver(); } } }
/// <summary> /// /// </summary> static public void Init() { _drivers = InstalledDriver.Installed; if (_drivers.Count > 0) { ASIODriver _drv = SelectDriver(_drivers[0]); if (_drv != null) { int nInChannels, nOutChannels; _drv.init(IntPtr.Zero); SampleRate = _drv.getSampleRate(); _drv.getChannels(out nInChannels, out nOutChannels); _inchannels.Clear(); for (int i = 0; i < nInChannels; i++) { _inchannels.Add((_drv.getChannelInfo(i, true)).name); } _outchannels.Clear(); for (int i = 0; i < nOutChannels; i++) { _outchannels.Add((_drv.getChannelInfo(i, false)).name); } _drv.ReleaseComASIODriver(); } } }
/// <summary> /// Instantiate the ASIO driver by GUID. /// </summary> /// <param name="guid">The GUID.</param> /// <returns>an ASIODriver instance</returns> public static ASIODriver GetASIODriverByGuid(Guid guid) { ASIODriver driver = new ASIODriver(); driver.initFromGuid(guid); return(driver); }
private void InitFromName(string driverName) { ASIODriver asiodriverByName = ASIODriver.GetASIODriverByName(driverName); this.driver = new ASIODriverExt(asiodriverByName); this.ChannelOffset = 0; }
/// <summary> /// Inits the driver from the asio driver name. /// </summary> /// <param name="driverName">Name of the driver.</param> private void initFromName(String driverName) { // Get the basic driver ASIODriver basicDriver = ASIODriver.GetASIODriverByName(driverName); // Instantiate the extended driver driver = new ASIODriverExt(basicDriver); }
/// <summary> /// Inits the driver from the asio driver name. /// </summary> /// <param name="driverName">Name of the driver.</param> private void InitFromName(String driverName) { // Get the basic driver ASIODriver basicDriver = ASIODriver.GetASIODriverByName(driverName); // Instantiate the extended driver driver = new ASIODriverExt(basicDriver); this.ChannelOffset = 0; }
/// <summary> /// Gets the names of the installed ASIO Driver. /// </summary> /// <returns>an array of driver names</returns> public static String[] GetDriverNames() { return(ASIODriver.GetASIODriverNames()); }
static ASIODriver SelectDriver(InstalledDriver _drvinf) { ASIODriver _drv = ASIODriver.GetASIODriverByGuid(new Guid(_drvinf.ClsId)); return(_drv); }