//wav转byte

 public void WavToByte()
            {
                Byte[] bs;
                FileStream fs = new FileStream(@"C:\1.wav", FileMode.Open, FileAccess.Read);
                bs = new Byte[fs.Length];
                fs.Read(bs, 0, (int)fs.Length);
                fs.Close();
            }

//byte转wav

public void ByteToWav(Byte[] bs)
        {
            FileStream fs = new FileStream(@"C:\2.wav", FileMode.OpenOrCreate, FileAccess.Write);
            fs.Write(bs, 0, bs.Length);
            fs.Close();
        }

 

posted on 2019-08-12 11:02  红磨坊后的白桦树  阅读(760)  评论(0编辑  收藏  举报