Exemplo n.º 1
0
 private void init()
 {
     for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
     {
         var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
         if (!device.IsEnabled)
         {
             continue;
         }
         var descriptor = string.Format("{0} - {1}", i, device.name);
         Console.WriteLine(descriptor);
         Console.WriteLine("  device.IsInput: " + (device.IsInput ? "true" : "false"));
         Console.WriteLine("  device.IsLoopback: " + (device.IsLoopback ? "true" : "false"));
         Console.WriteLine("  device.IsDefault: " + (device.IsDefault ? "true" : "false"));
         Console.WriteLine("  device.IsEnabled: " + (device.IsEnabled ? "true" : "false"));
         Console.WriteLine("  device.IsDisabled: " + (device.IsDisabled ? "true" : "false"));
         Console.WriteLine("  device.IsInitialized: " + (device.IsInitialized ? "true" : "false"));
         Console.WriteLine("  device.IsUnplugged: " + (device.IsUnplugged ? "true" : "false"));
         if (device.IsLoopback)
         {
             inlist.Items.Add(descriptor);
         }
         else if (!device.IsInput)
         {
             outlist.Items.Add(descriptor);
         }
     }
     inlist.SelectedIndex  = 0;
     outlist.SelectedIndex = 0;
 }
        /*
         * private void CreateContextMenu()
         * {
         *  _notifyIcon.ContextMenuStrip = new System.Windows.Forms.ContextMenuStrip();
         *  _notifyIcon.ContextMenuStrip.Items.Add("Dashboard").Click += (s, e) => ShowMainWindow();
         *  _notifyIcon.ContextMenuStrip.Items.Add("Enable All").Click += (s, e) => MyUtils.EnableAll();
         *  _notifyIcon.ContextMenuStrip.Items.Add("Disable All").Click += (s, e) => MyUtils.DisableAll();
         *
         *  ToolStrip ts = new ToolStrip();
         *  ToolStripDropDownButton tsddb = new ToolStripDropDownButton("device x");
         *  ts.Items.Add(tsddb);
         *  //tsddb.DropDown = _notifyIcon.ContextMenuStrip;
         *
         *
         *  _notifyIcon.ContextMenuStrip.Items.Add("Exit").Click += (s, e) => ExitApplication();
         * }
         */

        private void CreateContextMenu2()
        {
            System.Windows.Forms.ContextMenu m = new System.Windows.Forms.ContextMenu();
            m.MenuItems.Add("Dashboard").Click   += (s, e) => ShowMainWindow();
            m.MenuItems.Add("Enable All").Click  += (s, e) => MyUtils.EnableAll();
            m.MenuItems.Add("Disable All").Click += (s, e) => MyUtils.DisableAll();
            List <MenuItem> mItems = new List <MenuItem>();

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    var x = new MenuItem(string.Format("{0} - {1}", i, device.name), AudioSwitching);
                    mItems.Add(x);
                }
            }
            MenuItem mi = new MenuItem("Audio Device", mItems.ToArray());

            m.MenuItems.Add(mi);
            //tsddb.DropDown = _notifyIcon.ContextMenuStrip;


            m.MenuItems.Add("Exit").Click += (s, e) => ExitApplication();
            _notifyIcon.ContextMenu        = m;
        }
        private void InitDevices()
        {
            List <string> toAdd = new List <string>();

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    toAdd.Add(string.Format("{0} - {1}", i, device.name));
                }
            }
            cboDevices.Dispatcher.Invoke(() =>
            {
                cboDevices.Items.Clear();
                foreach (string s in toAdd)
                {
                    cboDevices.Items.Add(s);
                }
            });
            //cboDevices.SelectedIndex = 0;
            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            if (!Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero))
            {
                MessageBox.Show("Error while initializing the sound device");
            }
            deviceListInitialized = true;
        }
Exemplo n.º 4
0
        // initialization
        private void Init()
        {
            bool result = false;

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    _devicelist.Items.Add(string.Format("{0} - {1}", i, device.name));
                }
            }
            foreach (var entry in visualizers)
            {
                _visBoz.Items.Add(entry);
            }

            _visBoz.SelectedIndex = _visBoz.Items.Count - 1;
            Visuualizer           = visualizers[_visBoz.SelectedIndex];

            _devicelist.SelectedIndex = 0;
            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            if (!result)
            {
                throw new Exception("Init Error");
            }
        }
Exemplo n.º 5
0
 public void PrintDevices()
 {
     for (int Index = 0; Index < BassWasapi.BASS_WASAPI_GetDeviceCount(); Index++)
     {
         var BassDevice = BassWasapi.BASS_WASAPI_GetDeviceInfo(Index);
         if (BassDevice.IsEnabled && BassDevice.IsLoopback)
         {
             Console.WriteLine(string.Format("{0} - {1}", Index, BassDevice.name));
         }
     }
 }
 public static void InitDeviceComboBox(ComboBox deviceComboBox)
 {
     for (var i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
     {
         var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
         if (device.IsEnabled && device.IsLoopback)
         {
             deviceComboBox.Items.Add($"{i} - {device.name}");
         }
     }
     deviceComboBox.SelectedIndex = 0;
 }
Exemplo n.º 7
0
        public List <String> ReturnDevices()
        {
            List <String> Devices = new List <String>();

            for (int Index = 0; Index < BassWasapi.BASS_WASAPI_GetDeviceCount(); Index++)
            {
                var BassDevice = BassWasapi.BASS_WASAPI_GetDeviceInfo(Index);
                if (BassDevice.IsEnabled && BassDevice.IsLoopback)
                {
                    Devices.Add(string.Format("{0} - {1}", Index, BassDevice.name));
                }
            }
            return(Devices);
        }
        public List <string> GetDevices()
        {
            List <string> Devices = new List <string>();

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                BASS_WASAPI_DEVICEINFO device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    Devices.Add(string.Format("{0} - {1}", i, device.name));
                }
            }

            return(Devices);
        }
Exemplo n.º 9
0
        // initialization
        private void NewInit()
        {
            _t.Stop();
            _deviceCount = 0;
            bool       result            = false;
            List <int> DeviceActiveIndex = new List <int>();

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    DeviceActiveIndex.Add(i);
                    _deviceCount++;
                }
            }
            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            if (!result)
            {
                throw new Exception("Init Error");
            }
            if (_enable)
            {
                if (!_initialized)
                {
                    devindex = DeviceActiveIndex[DeviceActiveIndex.Count - 1];
                    result   = BassWasapi.BASS_WASAPI_Init(devindex, 0, 0, BASSWASAPIInit.BASS_WASAPI_BUFFER, 1f, 0.05f, _process, IntPtr.Zero);

                    if (!result)
                    {
                        var error = Bass.BASS_ErrorGetCode();
                        MessageBox.Show(error.ToString());
                    }
                    else
                    {
                        _initialized = true;
                    }
                }
                BassWasapi.BASS_WASAPI_Start();
            }
            else
            {
                BassWasapi.BASS_WASAPI_Stop(true);
            }
            System.Threading.Thread.Sleep(500);
            _t.Start();
        }
Exemplo n.º 10
0
        private int _lines = 16;            // number of spectrum lines

        //ctor
        public Analyzer(ComboBox devicelist)
        {
            _fft          = new float[1024];
            _lastlevel    = 0;
            _hanctr       = 0;
            _t            = new Timer();
            _t.Elapsed   += _t_Tick;
            _t.Interval   = 17; //60hz refresh rate
            _t.Enabled    = false;
            _process      = new WASAPIPROC(Process);
            _spectrumdata = new List <byte>();
            _devicelist   = devicelist;
            IsInitialized = false;

            devCount = BassWasapi.BASS_WASAPI_GetDeviceCount();
        }
Exemplo n.º 11
0
        // initialization
        private void Init()
        {
            settings = new SettingGroup("Audio Spectrum Settings", "");

            selectedDevice = new Setting("Selected Device", "", SettingControl.Dropdown, SettingType.Text, "");
            selectedDevice.configuration["options"] = new List <string>();
            settings.settings.Add(selectedDevice);

            channelCount = new Setting("Channels", "", SettingControl.Numeric, SettingType.Integer, 8);
            channelCount.configuration["interval"] = 1;
            settings.settings.Add(channelCount);

            bool result = false;

            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);

            if (!result)
            {
                throw new Exception("Init Error");
            }

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    //AudioSpectrumDevice audioDevice = new AudioSpectrumDevice(device,i);
                    //this.Devices.Add(audioDevice);
                    selectedDevice.configuration["options"].Add(string.Format("{0} - {1}", i, device.name));
                }
                //Console.WriteLine(string.Format("{0} - {1}", i, device.name));
            }
            settings.loadSettings();
            if (!string.IsNullOrWhiteSpace(selectedDevice.settingValue))
            {
                var str      = (selectedDevice.settingValue as string);
                var array    = str.Split(' ');
                int devindex = Convert.ToInt32(array[0]);

                var myDevice = BassWasapi.BASS_WASAPI_GetDeviceInfo(devindex);
                AudioSpectrumDevice audioDevice = new AudioSpectrumDevice(myDevice, devindex, (int)Math.Floor((double)channelCount.settingValue));
                this.Devices.Add(audioDevice);
            }
            selectedDevice.PropertyChanged += SelectedDevice_PropertyChanged;
        }
Exemplo n.º 12
0
 private void Init()
 {
     Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
     if (!Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero))
     {
         throw new Exception("Init Error");
     }
     for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
     {
         BASS_WASAPI_DEVICEINFO device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
         if (device.IsEnabled && device.IsLoopback)
         {
             devicelist.Items.Add(string.Format("{0} - {1}", i, device.name));
         }
     }
     devicelist.SelectedIndex = 0;
 }
        // initialization
        private void Init()
        {
            for (var i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    _devicelist.Items.Add($"{i} - {device.name}");
                }
            }
            _devicelist.SelectedIndex = 0;
            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            var result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);

            if (!result)
            {
                throw new Exception("Init Error");
            }
        }
Exemplo n.º 14
0
        // initialization
        private void Init()
        {
            try
            {
                Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
                Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UNICODE, true);
            }
            catch (System.TypeInitializationException e)
            {
                return; //   throw new Exception("Init Error", e);
            }

            if (!(Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero)))
            {
                throw new Exception("Init Error");
            }

            try
            {
                for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
                {
                    var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                    if (device.IsEnabled && device.IsLoopback)
                    {
                        _devicelist.Items.Add(string.Format(System.Globalization.CultureInfo.CurrentCulture, "{0} - {1}", i, device.name));
                        System.Diagnostics.Debug.Print("Found device: " + device.name);
                        System.Diagnostics.Debug.Print("Default? " + device.IsDefault);
                        System.Diagnostics.Debug.Print("Input? " + device.IsInput);
                        System.Diagnostics.Debug.Print("Loopb? " + device.IsLoopback);
                        System.Diagnostics.Debug.Print("Unplugged? " + device.IsUnplugged);
                        System.Diagnostics.Debug.Print("Init? " + device.IsInitialized);
                        System.Diagnostics.Debug.Print(device + "\n");
                    }
                }
            } catch (System.DllNotFoundException e)
            {
                System.Diagnostics.Debug.Print("It seems like you loaded the wrong basswasapi.dll. Be sure to put the x64-dll to the x64-Build folder and the same with x32-dll in the x32 folder: " + e.Message);
            }
            _devicelist.SelectedIndex = 0;

            absNotRel      = false;
            minSliderValue = 0;
        }
Exemplo n.º 15
0
        // initialization
        private void Init()
        {
            bool result = false;

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && (device.IsInput || device.IsLoopback))// && device.IsLoopback)
                {
                    _devicelist.Items.Add(string.Format("{0} - {1}", i, device.name));
                }
            }
            _devicelist.SelectedIndex = (_devicelist.Items.Count > 0?1:0);
            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            if (!result)
            {
                throw new Exception("Init Error");
            }
        }
Exemplo n.º 16
0
        public void InitializeBass()
        {
            MainFormClass.AudioSourceComboBox.Items.Clear();
            int DeviceCount = BassWasapi.BASS_WASAPI_GetDeviceCount();

            for (int i = 0; i < DeviceCount; i++)
            {
                SetLoadingLabelTo("BASS.NET: Device " + i + " out of " + DeviceCount);
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    MainFormClass.AudioSourceComboBox.Items.Add(string.Format("{0} - {1}", i, device.name));
                }
            }

            foreach (string s in SerialPort.GetPortNames())
            {
                MainFormClass.ComPortsComboBox.Items.Add(s);
            }
        }
Exemplo n.º 17
0
        private void Init()
        {
            Boolean Result = false;

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                BASS_WASAPI_DEVICEINFO device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    _devace.Add(String.Format("{0} - {1}", i, device.name));
                }
            }

            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            Result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);

            if (!Result)
            {
                throw new Exception("Ошибка инициализации");
            }
        }
Exemplo n.º 18
0
        private void Init()
        {
            bool result = false;

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    AudioDevice newdevice = new AudioDevice();
                    newdevice.deviceIndex = i;
                    newdevice.Name        = device.name;
                    _devicelist.Add(newdevice);
                }
            }
            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            if (!result)
            {
                throw new Exception("Init Error");
            }
        }
Exemplo n.º 19
0
        public SoundAnalyzer(int channels)
        {
            DispatcherTimer           = new DispatcherTimer();
            DispatcherTimer.Tick     += OnDispatcherTimerTick;
            DispatcherTimer.Interval  = TimeSpan.FromMilliseconds(25);
            DispatcherTimer.IsEnabled = false;
            isInitialised             = false;

            SpectrumData = new byte[channels];
            Channels     = channels;
            Devices      = new List <BASS_WASAPI_DEVICEINFO>();

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    ((List <BASS_WASAPI_DEVICEINFO>)Devices).Add(device);

                    if (device.IsDefault)
                    {
                        CurrentDevice = i;
                    }
                }
            }

            if (CurrentDevice == -1)
            {
                CurrentDevice = Devices.Count() - 1;
            }

            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            bool result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);

            if (!result)
            {
                throw new Exception("Init Error");
            }
        }
Exemplo n.º 20
0
        private async void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            if (!Directory.Exists(Directory.GetCurrentDirectory() + "\\Saves"))
            {
                Directory.CreateDirectory(Directory.GetCurrentDirectory() + "\\Saves");
            }

            SaveFileDialog.DefaultExt   = ".txt";
            LoadFileDialog.DefaultExt   = ".txt";
            SaveFileDialog.AddExtension = true;
            LoadFileDialog.AddExtension = true;

            AudioSourceCombobox.Items.Clear();
            int DeviceCount = BassWasapi.BASS_WASAPI_GetDeviceCount();

            for (int i = 0; i < DeviceCount; i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    AudioSourceCombobox.Items.Add(string.Format("{0} - {1}", i, device.name));
                }
            }
            AudioSourceCombobox.SelectedIndex = 0;

            RefreshRateCombobox.Items.Clear();
            for (int i = 0; i < 105; i += 5)
            {
                RefreshRateCombobox.Items.Add(i.ToString());
            }
            RefreshRateCombobox.SelectedIndex = 0;

            if (File.Exists("Saves\\autosave.txt"))
            {
                LoadConfig("Saves\\autosave.txt");
            }

            await GI.FadeIn(this);
        }
Exemplo n.º 21
0
        private void _t2_Tick(object sender, EventArgs e)
        {
            int temp = 0;

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    temp++;
                }
            }
            if (temp != _deviceCount)
            {
                _hanctr      = 0;
                _l.Value     = 0;
                _r.Value     = 0;
                _initialized = false;
                Free();
                NewInit();
            }
        }
Exemplo n.º 22
0
 private void DeviceBox_DropDownOpened(object sender, EventArgs e)
 {
     if (DeviceBox.Items.Count == 0)
     {
         bool result = false;
         for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
         {
             var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
             if (device.IsEnabled && device.IsLoopback)
             {
                 DeviceBox.Items.Add(string.Format("{0} - {1}", i, device.name));
             }
         }
         DeviceBox.SelectedIndex = 0;
         Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
         result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
         if (!result)
         {
             throw new Exception("Init Error");
         }
     }
 }
Exemplo n.º 23
0
        public void Init(int lines, ComboBox deviceBox, Gradient grd)
        {
            this.lines     = lines;
            this.deviceBox = deviceBox;
            this.grd       = grd;

            fft          = new float[1024];
            lastlevel    = 0;
            hanctr       = 0;
            t            = new Timer();
            t.Tick      += new EventHandler(tick);
            t.Interval   = 1000 / 40; // 40hz refresh rate
            t.Enabled    = false;
            process      = new WASAPIPROC(Process);
            spectrumdata = new List <Tuple <byte, Color> >();
            lastdata     = new List <byte>();

            bool result = false;

            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    deviceBox.Items.Add(string.Format("{0} - {1}", i, device.name));
                }
            }
            deviceBox.SelectedIndex = 0;
            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);
            result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            if (!result)
            {
                throw new Exception("Init Error");
            }

            deviceBox.SelectedIndexChanged += deviceChanged;
        }
Exemplo n.º 24
0
        //initialisation of BassWasapi stuff
        private void Init()
        {
            bool result = false;

            //this part is used when there are several output devices
            //the devices list is created, every devise is numbered
            for (int i = 0; i < BassWasapi.BASS_WASAPI_GetDeviceCount(); i++)
            {
                var device = BassWasapi.BASS_WASAPI_GetDeviceInfo(i);
                if (device.IsEnabled && device.IsLoopback)
                {
                    devices.Add(string.Format("{0} - {1}", i, device.name));
                }
            }
            selectedIndex = 0;

            Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_UPDATETHREADS, false);

            result = Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
            if (!result)
            {
                throw new Exception("Init Error");
            }
        }