Exemple #1
0
 public static void Init(int device)
 {
     IsInitialized = true;
     Info          = new BassDirectSoundDeviceInfo(
         Bass.CurrentDevice,
         0,
         Bass.Info.SpeakerCount,
         OutputRate.GetRates(Bass.Info.SampleRate, Bass.Info.MinSampleRate, Bass.Info.MaxSampleRate),
         device == Bass.DefaultDevice
         );
     LogManager.Logger.Write(typeof(BassDirectSoundDevice), LogLevel.Debug, "Detected DS device: {0} => Inputs => {1}, Outputs = {2}, Rate = {3}", Bass.CurrentDevice, Info.Inputs, Info.Outputs, Info.Rate);
     LogManager.Logger.Write(typeof(BassDirectSoundDevice), LogLevel.Debug, "Detected DS device: {0} => Rates => {1}", Bass.CurrentDevice, string.Join(", ", Info.SupportedRates));
 }
        public static void Init(int device)
        {
            IsInitialized = true;
            Device        = device;
            var info = default(DeviceInfo);

            BassUtils.OK(Bass.GetDeviceInfo(BassUtils.GetDeviceNumber(Device), out info));
            Devices[Device] = new BassDirectSoundDeviceInfo(
                info.Name,
                Bass.Info.SampleRate,
                0,
                Bass.Info.SpeakerCount,
                OutputRate.GetRates(Bass.Info.MinSampleRate, Bass.Info.MaxSampleRate)
                );
            LogManager.Logger.Write(typeof(BassDirectSoundDevice), LogLevel.Debug, "Detected DS device: {0} => Name => {1}, Inputs => {2}, Outputs = {3}, Rate = {4}", Device, Info.Name, Info.Inputs, Info.Outputs, Info.Rate);
            LogManager.Logger.Write(typeof(BassDirectSoundDevice), LogLevel.Debug, "Detected DS device: {0} => Rates => {1}", Device, string.Join(", ", Info.SupportedRates));
        }