コード例 #1
0
 public static byte[] Serialize(VoiceCapturedEventArgs source)
 {
     byte[] Rezult;
     using (MemoryStream ms = new MemoryStream())
     {
         BinaryFormatter bf = new BinaryFormatter();
         bf.Serialize(ms, source);
         Rezult = ms.ToArray();
         ms.Flush();
     }
     return Rezult;
 }
コード例 #2
0
ファイル: WaveIn.cs プロジェクト: ericQiang/selector-theater
 private void OnWaveRecorded(IntPtr ptrData, int iSize, WaveFormat format)
 {
     VoiceCapturedEventArgs e = new VoiceCapturedEventArgs();// {Date = DateTime.Now, Format = format};
     e.Source = new byte[iSize];
     Marshal.Copy(ptrData, e.Source, 0, iSize);
     if (WaveRecorded!=null) //Igor 08.31
     WaveRecorded(this,e);
 }