Hello there,
I am trying to use a TMediaPlayer object to record sounds from an application, but without success. What I do not get is how to create the .wav file. Here is a snippet of code:-
void __fastcall TForm1::FormCreate(TObject *Sender)
{
MediaPlayer1->DeviceType = dtAutoSelect;
MediaPlayer1->FileName = "C:\\GUIS\\Tmedia\\TEST.wav";
MediaPlayer1->Open();
}
How can the file exist before you have created it ?
What I have tried to do is open a file called test.wav
using fopen() and assign that to MediaPlayer1->FileName
and try to record on to that. Somehow this does not feel right.
How can I use a TMedia object to CREATE a new .wav file for recording sounds ?
THanks in advance,
Steven matthews
I am trying to use a TMediaPlayer object to record sounds from an application, but without success. What I do not get is how to create the .wav file. Here is a snippet of code:-
void __fastcall TForm1::FormCreate(TObject *Sender)
{
MediaPlayer1->DeviceType = dtAutoSelect;
MediaPlayer1->FileName = "C:\\GUIS\\Tmedia\\TEST.wav";
MediaPlayer1->Open();
}
How can the file exist before you have created it ?
What I have tried to do is open a file called test.wav
using fopen() and assign that to MediaPlayer1->FileName
and try to record on to that. Somehow this does not feel right.
How can I use a TMedia object to CREATE a new .wav file for recording sounds ?
THanks in advance,
Steven matthews