//check voice mode this.serialPort.Write("AT+FCLASS=8" + System.Convert.ToChar(13).ToString()); //start calling this.serialPort.Write("ATDT123456" + System.Convert.ToChar(13).ToString()); System.Threading.Thread.Sleep(20000); //Enter Voice-Transmission Mode this.serialPort.Write("AT+VTX" + System.Convert.ToChar(13).ToString()); bool MSwitch = false; byte[] buffer = new byte[20000]; FileStream strm = new FileStream(@"C:\Users\Master\Desktop\Prmpt445.wav", System.IO.FileMode.Open); MemoryStream ms = new MemoryStream(); int count = ms.Read(buffer, 44, buffer.Length - 44); BinaryReader rdr = new BinaryReader(strm); while (!MSwitch) { byte[] bt = new byte[1024]; bt = rdr.ReadBytes(1024); if (bt.Length == 0) { MSwitch = true; break; } } strm.Close(); strm.Dispose();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)