public AudioEngineNode() { FEngine = AudioService.Engine; var drivers = AsioOut.GetDriverNames(); if (drivers.Length > 0) { EnumManager.UpdateEnum("NAudioASIO", drivers[0], drivers); } else { drivers = new string[] { "No ASIO!? -> go download ASIO4All" }; EnumManager.UpdateEnum("NAudioASIO", drivers[0], drivers); } //also add a default entry to the sampling rate enum var samplingRates = new string[] { "44100" }; EnumManager.UpdateEnum("ASIODriverSampleRates", samplingRates[0], samplingRates); }
public virtual void OnImportsSatisfied() { FEngine = AudioService.Engine; ParameterNamesConfig.SliceCount = 0; var flags = BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public; //Retrieve all FieldInfos var fields = GetType().GetFields(flags); FDiffInputs.Clear(); foreach (var fi in fields) { if (typeof(IDiffSpread).IsAssignableFrom(fi.FieldType)) { //Retrieve the value of the field, and cast as necessary var spread = (IDiffSpread)fi.GetValue(this); FDiffInputs.Add(spread); } } ParameterNamesConfig.Changed += ParameterNamesConfig_Changed; }
public virtual void OnImportsSatisfied() { FEngine = AudioService.Engine; ParameterNamesConfig.SliceCount = 0; BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public; //Retrieve all FieldInfos var fields = GetType().GetFields(flags); FDiffInputs.Clear(); foreach (var fi in fields) { if(typeof(IDiffSpread).IsAssignableFrom(fi.FieldType)) { //Retrieve the value of the field, and cast as necessary var spread = (IDiffSpread)fi.GetValue(this); FDiffInputs.Add(spread); } } ParameterNamesConfig.Changed += ParameterNamesConfig_Changed; }
public AudioEngineNode() { FEngine = AudioService.Engine; var drivers = AsioOut.GetDriverNames(); if (drivers.Length > 0) { EnumManager.UpdateEnum("NAudioASIO", drivers[0], drivers); } else { drivers = new string[]{"No ASIO!? -> go download ASIO4All"}; EnumManager.UpdateEnum("NAudioASIO", drivers[0], drivers); } //also add a default entry to the sampling rate enum var samplingRates = new string[] { "44100" }; EnumManager.UpdateEnum("ASIODriverSampleRates", samplingRates[0], samplingRates); }
public AudioEngineNode() { FEngine = AudioService.Engine; var drivers = AsioOut.GetDriverNames(); if (drivers.Length > 0) { EnumManager.UpdateEnum("NAudioASIO", drivers[0], drivers); } else { drivers = new string[]{"No ASIO!? -> go download ASIO4All"}; EnumManager.UpdateEnum("NAudioASIO", drivers[0], drivers); } }
static AudioService() { FAudioEngine = new AudioEngine(); }