public MainForm() { InitializeComponent(); _handler = new AudioHandler(); _tcpStream = new TcpStream(); _tcpStream.Listen(); }
public void StartRecording(TcpStream tcpStream) { if (_isRecording) { return; } _waveIn = new WasapiLoopbackCapture(); _writer = new LameMP3FileWriter(tcpStream, _waveIn.WaveFormat, 320); _waveIn.DataAvailable += OnDataAvailable; _waveIn.RecordingStopped += OnRecordingStopped; _waveIn.StartRecording(); _isRecording = true; }