Тема: TMediaPlayer (2?)
Показать сообщение отдельно
  #5  
Старый 16.07.2007, 11:13
Аватар для 4kusNick
4kusNick 4kusNick вне форума
Местный
 
Регистрация: 06.09.2006
Адрес: Россия, Санкт-Петербург
Сообщения: 444
Репутация: 550
По умолчанию

Код:
procedure TForm1.btRecordClick(Sender: TObject);
begin
  with Media do 
  begin
    { Set FileName to the test.wav file to }
    { get the recording parameters. }
    FileName := 'd:\test.wav';
    { Open the device. }
    Open;
    { Start recording. }
    Wait := False;
    StartRecording;
  end;
end;
 

procedure TForm1.btStopClick(Sender: TObject);
begin
  with Media do 
  begin
    { Stop recording. }
    Stop;
    { Change the filename to the new file we want to write. }
    FileName := 'd:\new.wav';
    { Save and close the file. }
    Save;
    Close;
  end;
end;
__________________
THE CRACKER IS OUT THERE
Ответить с цитированием