示例#1
0
        public void PlaySync()
        {
            Start();

            if (mstream == null)
            {
                SystemSounds.Beep.Play();
                return;
            }

            if (!use_win32_player)
            {
                try {
                    if (adata == null)
                    {
                        adata = new WavData(mstream);
                    }
                    if (adev == null)
                    {
                        adev = AudioDevice.CreateDevice(null);
                    }
                    if (adata != null)
                    {
                        adata.Setup(adev);
                        adata.Play(adev);
                    }
                } catch {
                }
            }
            else
            {
                win32_player.PlaySync();
            }
        }