Пример #1
0
        public static void ShowControlPanel(string asioDriverName)
        {
            if (asioOut != null)
            {
                asioOut.Dispose();
            }

            int i = 0;

            foreach (string s in AsioOut.GetDriverNames())
            {
                if (asioDriverName == s)
                {
                    break;
                }
                i++;
            }
            int retry = 3;

            do
            {
                try
                {
                    asioOut = new AsioOut(i);
                }
                catch
                {
                    asioOut = null;
                    Thread.Sleep(1000);
                    retry--;
                }
            } while (asioOut == null && retry > 0);

            asioOut.ShowControlPanel();
        }
Пример #2
0
        private void buttonControlPanel_Click(object sender, EventArgs e)
        {
            AsioOut asio = waveOut as AsioOut;

            if (asio != null)
            {
                asio.ShowControlPanel();
            }
        }
Пример #3
0
 private void buttonControlPanel_Click(object sender, EventArgs args)
 {
     try
     {
         using (var asio = new AsioOut(SelectedDeviceName))
         {
             asio.ShowControlPanel();
         }
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }
Пример #4
0
 private void button_asioPanel_Click(object sender, EventArgs e)
 {
     try
     {
         using (var asio = new AsioOut(AsioDeviceName))
         {
             asio.ShowControlPanel();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error");
     }
 }
Пример #5
0
        private void initialise()
        {
            inputMapper.Name  = driver.DriverName;
            outputMapper.Name = driver.DriverName;

            inputMapper.Initialise(format, driver);
            outputMapper.Initialise(format, driver);

            driver.InitRecordAndPlayback(
                outputMapper.OutputBuffer,
                inputMapper.Format.Channels,
                inputMapper.Format.SampleRate);
#if DEBUG
            driver.ShowControlPanel();
#endif
            initialised = true;
        }
Пример #6
0
        //called when data for any output pin is requested
        public void Evaluate(int SpreadMax)
        {
            FOutput.SliceCount = SpreadMax;

            if (FDriverIn.IsChanged)
            {
                CreateAsio();
                if (FPlayIn[0])
                {
                    FAsioOut.Play();
                }
            }

            if (FShowPanelIn[0])
            {
                FAsioOut.ShowControlPanel();
            }

            if (FWave != FWaveIn[0])
            {
                FWave = FWaveIn[0];
                CreateAsio();
                if (FPlayIn[0])
                {
                    FAsioOut.Play();
                }
            }

            if (FPlayIn.IsChanged)
            {
                if (FPlayIn[0])
                {
                    FAsioOut.Play();
                }
                else
                {
                    FAsioOut.Stop();
                }
            }
        }
Пример #7
0
 public void ShowASIOCPanel()
 {
     asioOut.ShowControlPanel();
 }