示例#1
0
        private void playButton_Click(object sender, EventArgs e)
        {
            Filehandler fh = new Filehandler(selectedFile);

            fh.toBytes();
            Stopwatch st = new Stopwatch();

            st.Start();
            Thread playing = new Thread(() => playingSound(st, fh));

            playing.Start();
        }
示例#2
0
        public void playingSound(Stopwatch st, Filehandler fh)
        {
            SendSound s = new SendSound();

            while (st.ElapsedMilliseconds <= 115000)
            {
                uint[] currentByte = fh.getNextByte();

                int i = 0;
                if (currentByte != null)
                {
                    foreach (uint bit in currentByte)
                    {
                        s.createSound(bit);
                    }
                }
            }
        }