void AudioProvider_DataAvailable(object Sender, DataAvailableEventArgs E) { try { lock (_syncLock) { if (_disposed) { return; } } _videoWriter.WriteAudio(E.Buffer, E.Length); } catch (Exception e) { if (_imageProvider == null) { lock (_syncLock) { if (!_disposed) { ErrorOccurred?.Invoke(e); Dispose(true, true); } } } } }
void AudioProvider_DataAvailable(object sender, DataAvailableEventArgs e) { try { _videoWriter.WriteAudio(e.Buffer, e.Length); } catch (Exception exception) { Console.WriteLine(exception); } }
void AudioDataAvailable(object sender, DataAvailableEventArgs e) { try { if (_audioProvider.IsSynchronizable) { if (WaitHandle.WaitAny(new WaitHandle[] { _videoFrameWritten, _stopCapturing }) != 0) { return; } _videoEncoder.WriteAudio(e.Buffer, e.Length); _audioBlockWritten.Set(); } else { _videoEncoder.WriteAudio(e.Buffer, e.Length); } } catch { } }
void AudioProvider_DataAvailable(object sender, DataAvailableEventArgs e) { _videoWriter.WriteAudio(e.Buffer, e.Length); }
void AudioProvider_DataAvailable(object sender, DataAvailableEventArgs e) { try { _frames.Add(e); } catch { } }
void AudioProvider_DataAvailable(object Sender, DataAvailableEventArgs E) { _videoWriter.WriteAudio(E.Buffer, E.Length); }