private void RecordButton_Click(object sender, EventArgs e) { if (!recording) { RecordButton.Text = "Stop"; stream = new MemoryStream(); sourceStream = new WaveIn(); sourceStream.WaveFormat = new WaveFormat(8000, 1); // sourceStream.WaveFormat = new WaveFormat(); count = 0; waveWriter = new WaveFileWriter(stream, sourceStream.WaveFormat); id = service.createNewStream(details.Username, details.Password, details.ToList.ToArray(), 1); sourceStream.DataAvailable += WaveSource_DataAvailable; sourceStream.StartRecording(); sourceStream.RecordingStopped += SourceStream_RecordingStopped; } else { RecordButton.Text = "Record"; StopButton_Click(sender, e); } }
public AudioInterface(string username) { version = audioclient.getVersion(); int id = audioclient.createNewStream(username, "images", null, 1); }