private void StopWasapi()
 {
     if (WasapiIn != null)
     {
         WasapiIn.StopRecording();
         WasapiIn.Dispose();
     }
 }
Пример #2
0
 private void SendUdpData(byte[] buf, int bytesRecorded)
 {
     try
     {
         if (!udpConnectionActive)
         {
             recorder.StopRecording();
             return;
         }
         var ep = remoteEndPoint as EndPoint;
         udpWriter.WriteBytes(buf);
     }
     catch (Exception)
     {
         recorder.StopRecording();
     }
 }