Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mediaplayer free file

Status
Not open for further replies.

filipe26

Programmer
Mar 17, 2003
152
PT
Hi i have a tmediaplayer and after ,when i save a recorded file(wav),i cannot create a filestream with the same name because tells me that the file is used by another application.How can i free the saved file to use it for another thing.Mediaplayer.filename.free doesnt exist.
 
Perhaps you should post a sample of your code so we can see a bit better what exactly is happening.

Arte Et Labore
 
with player do
begin
ficheiro:=opt.dir.Text+'\temp.wav';
FileName:=ficheiro;
Save;
wavfilename:=filename;
wavFile := TFileStream.Create(wavFileName,fmOpenRead);{Stops Here because cannot create the file}
end;

Not used by application but other process.(Sorry)
 
isnt there like an unload procedure for mediaplayer ???
i think its still the mediaplayer itself.

But couldnt you just name the stream differently ???
"wavFileStream" for example ???


[bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
But the problem doesnt the name of the stream but the file and mediaplayer dont have any unload function.
 
Just wondering, why do you have three copies of the same thing?

ficheiro:=opt.dir.Text+'\temp.wav';
FileName:=ficheiro;
wavfilename:=filename;

Why can't you just use one string?
 
filename its a property not a variable and the others for nothing but you dont reply to my question.
 
Ok so if i cant resolve the problem i ask if someone knows a component with the same caracteristics of mediaplayer but with the function unload or free the sample or file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top