Пример #1
0
            public void TestShortData(short[] dataToSendAudio, int iLen)
            {
                for (int i = 0; i < iLen; i++)
                {
                    byte left  = (byte)(dataToSendAudio[i] >> 8);
                    byte right = (byte)(dataToSendAudio[i]);
                    tempByte[i * 2]     = left;
                    tempByte[i * 2 + 1] = right;
                }


                if (tempByteCheck == 0)
                {
                    System.IO.File.WriteAllBytes("TestShortData.pcm", tempByte);
                    tempByteCheck++;
                }
                else
                {
                    System.Console.WriteLine("Writing to TestShortData.pcm");
                    P2PWrapper.AppendAllBytes("TestShortData.pcm", tempByte);
                }
            }