C#中音频流数据来的byte[],比如在网络上传过来一首MP3,如何实时播放,用什么方法,音频是MP3格式的!急,急,急,求救。

解决方案 »

  1.   

    楼主解决了吗?如果解决了 求分享 [email protected]
      

  2.   

    byte[] 可以保存为音频文件吧.保存以后,用播放器,直接播放就可以        public static bool getBytesOfFile(string path, byte[] file)
            {
                bool flag = false;
                try
                {
                    FileStream fs;
                    FileInfo fi = new FileInfo(path);
                    fs = fi.OpenWrite();
                    fs.Write(file, 0, file.Length);
                    fs.Close();
                    flag = true;
                }
                catch (Exception ce)
                {
                    XtraMessageBox.Show(ce.Message,"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
                }
                return flag;
            }类似这样的代码.