コード例 #1
0
 public void RequestStop()
 {
     if (dataMaker != null)
     {
         while (dataMaker.IsRunning())
         {
             dataMaker.RequestStop();
             Application.DoEvents();//Waveデバイス対策
         }
     }
     if (dataSender != null)
     {
         while (dataSender.IsRunning())
         {
             dataSender.RequestStop();
             Application.DoEvents();//Waveデバイス対策
         }
     }
     if (emuChipSender != null)
     {
         while (emuChipSender.IsRunning())
         {
             emuChipSender.RequestStop();
             Application.DoEvents();//Waveデバイス対策
         }
     }
     if (realChipSender != null)
     {
         while (realChipSender.IsRunning())
         {
             realChipSender.RequestStop();
             Application.DoEvents();//Waveデバイス対策
         }
     }
 }
コード例 #2
0
ファイル: SoundManager.cs プロジェクト: kuma4649/MDSound
 public void RequestStop()
 {
     while (dataMaker.IsRunning())
     {
         dataMaker.RequestStop();
     }
     while (dataSender.IsRunning())
     {
         dataSender.RequestStop();
     }
     while (emuChipSender.IsRunning())
     {
         emuChipSender.RequestStop();
     }
     while (realChipSender.IsRunning())
     {
         realChipSender.RequestStop();
     }
 }
コード例 #3
0
        public void RequestStop()
        {
            if (dataMaker != null)
            {
                while (dataMaker.IsRunning())
                {
                    dataMaker.RequestStop();
                    Application.DoEvents();//Waveデバイス対策
                }
            }
            if (dataSender != null)
            {
                while (dataSender.IsRunning())
                {
                    dataSender.RequestStop();
                    Application.DoEvents();//Waveデバイス対策
                }
            }
            if (emuChipSender != null)
            {
                while (emuChipSender.IsRunning())
                {
                    emuChipSender.RequestStop();
                    Application.DoEvents();//Waveデバイス対策
                    emuChipSender.recvBuffer.Init(DATA_SEQUENCE_FREQUENCE);
                }
            }
            if (realChipSender != null)
            {
                while (realChipSender.IsRunning())
                {
                    realChipSender.RequestStop();
                    Application.DoEvents();//Waveデバイス対策
                }
            }

            //if (isVirtualOnlySend)
            {
                Audio.stopDataVirtulaOnlySend = dataSender.stopData;
            }
        }
コード例 #4
0
        public void RequestStop()
        {
            int waitCounter;

            if (dataMaker != null)
            {
                waitCounter = 1000;
                while (dataMaker.IsRunning())
                {
                    dataMaker.RequestStop();
                    Application.DoEvents();//Waveデバイス対策

                    System.Threading.Thread.Sleep(1);
                    waitCounter--;
                    if (waitCounter == 0)
                    {
                        mml2vgmIDE.log.Write("timeout : stop request at dataMaker");
                        break;
                    }
                }
            }
            if (dataSender != null)
            {
                waitCounter = 1000;
                while (dataSender.IsRunning())
                {
                    dataSender.RequestStop();
                    Application.DoEvents();//Waveデバイス対策

                    System.Threading.Thread.Sleep(1);
                    waitCounter--;
                    if (waitCounter == 0)
                    {
                        mml2vgmIDE.log.Write("timeout : stop request at dataSender");
                        break;
                    }
                }
            }
            if (emuChipSender != null)
            {
                waitCounter = 1000;
                while (emuChipSender.IsRunning())
                {
                    emuChipSender.RequestStop();
                    Application.DoEvents();//Waveデバイス対策

                    System.Threading.Thread.Sleep(1);
                    waitCounter--;
                    if (waitCounter == 0)
                    {
                        mml2vgmIDE.log.Write("timeout : stop request at emuChipSender");
                        //emuChipSender.recvBuffer.Init(DATA_SEQUENCE_FREQUENCE);
                        emuChipSender.recvBuffer.Clear();
                        break;
                    }
                }
            }
            if (realChipSender != null)
            {
                waitCounter = 1000;
                while (realChipSender.IsRunning())
                {
                    realChipSender.RequestStop();
                    Application.DoEvents();//Waveデバイス対策

                    System.Threading.Thread.Sleep(1);
                    waitCounter--;
                    if (waitCounter == 0)
                    {
                        mml2vgmIDE.log.Write("timeout : stop request at realChipSender");
                        break;
                    }
                }
            }

            //if (isVirtualOnlySend)
            {
                Audio.stopDataVirtulaOnlySend = dataSender.stopData;
            }
        }