コード例 #1
0
 public MainForm()
 {
     InitializeComponent();
     _handler   = new AudioHandler();
     _tcpStream = new TcpStream();
     _tcpStream.Listen();
 }
コード例 #2
0
        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;
        }