示例#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();
 }