Posted: Tue May 30, 2006 10:04 pm
That's just insane!
And all your other media players works fine?
Anyone else having this problem?

And all your other media players works fine?
Anyone else having this problem?
http://www.purebasic.com
https://www.purebasic.fr/english/
Hmm, i'm not shure exactly what it could be!rsts wrote:If you would like to send a code snippet or whatever I can attempt to determine what's happening, but it just goes away.
Code: Select all
Define Tag.s{3}, Title.s{30}, Length.s{128}, File.s = OpenFileRequester("Open","","All files (*.*)|*.*",0)
If File
If mciSendString_("OPEN "+#DQUOTE$+File+#DQUOTE$+" TYPE MPEGVIDEO ALIAS Temp",0,0,0)=0
mciSendString_("STATUS Temp LENGTH",@Length,128,0)
mciSendString_("CLOSE Temp",0,0,0)
Debug "Filename: " + Left(GetFilePart(File),Len(GetFilePart(File))-4)
Debug "Length (seconds): " + Str(Val(Length)/1000)
If ReadFile(0,File)
FileSeek(0,Lof(0)-128)
ReadData(0,@Tag,3)
If Tag = "TAG"
ReadData(0,@Title,30)
Debug "Title: " + Title
EndIf
CloseFile(0)
EndIf
EndIf
EndIf
not quite sure I understand what you mean by removing the fixed strings, but if I attempt to open c:\test.mp3, I get the same memory error as before.Flype wrote:hello,
and if you try to remove the fixed strings {3}, {30}, ... ?
and does it works with file = "c:\test.mp3 ?"
Code: Select all
Define Tag.s{3}, Title.s{30}, Length.s{128}, File.s = OpenFileRequester("Open","","All files (*.*)|*.*",0)
If File
If mciSendString_("OPEN "+#DQUOTE$+File+#DQUOTE$+" TYPE MPEGVIDEO ALIAS Temp",0,0,0)=0
mciSendString_("STATUS Temp LENGTH",@Length,128,0)
mciSendString_("CLOSE Temp",0,0,0)
Debug "Filename: " + Left(GetFilePart(File),Len(GetFilePart(File))-4)
Debug "Length (seconds): " + Str(Val(Length)/1000)
If ReadFile(0,File)
FileSeek(0,Lof(0)-128)
ReadData(0,@Tag,3)
If Tag = "TAG"
ReadData(0,@Title,30)
Debug "Title: " + Title
EndIf
CloseFile(0)
EndIf
EndIf
EndIf
I thought that might be what you meant, but anything except a number gives me a syntax error.Flype wrote: i mean on the first line of this source code
and using space() instead of {}... maybe who knows
Code: Select all
Define Tag.s{3}, Title.s{30}, Length.s{128}, File.s = OpenFileRequester("Open","","All files (*.*)|*.*",0)
If File
If mciSendString_("OPEN "+#DQUOTE$+File+#DQUOTE$+" TYPE MPEGVIDEO ALIAS Temp",0,0,0)=0
mciSendString_("STATUS Temp LENGTH",@Length,128,0)
mciSendString_("CLOSE Temp",0,0,0)
Debug "Filename: " + Left(GetFilePart(File),Len(GetFilePart(File))-4)
Debug "Length (seconds): " + Str(Val(Length)/1000)
EndIf
EndIf