Hi,
I am trying to get TAudioRecorder to work. I have the following routines:
procedure TForm1.btnSaveWaveClick(Sender: TObject);
begin
if dlgSaveWave.Execute then
lblSaveWave.Caption := dlgSaveWave.FileName
else
lblSaveWave.Caption := '';
end;
procedure TForm1.btnRecordWaveClick(Sender: TObject);
begin
arRecordWave.DeviceID := 0;
arRecordWave.Active := True;
end;
procedure TForm1.btnStopRecordingClick(Sender: TObject);
begin
arRecordWave.Active := False;
arRecordWave.Wave.SaveToFile(lblSaveWave.Caption);
lblLastError.Caption := arRecordWave.LastErrorText;
end;
To test the code, I start a music file playing using Windows Media Player and then set the name of the file I want recorded into the lblSaveWave label. Then I invoke the 'start recording' sequence. After the song is over, I click the 'stop recording' button to save the stream to a file.
The stream successfully saves but it it all 'silence' -- no music. What am I doing wrong? THANKS for the help!!!