Hello!
I am afraid you can't compare the files without loading them somewhere.
Well, I came up with this. It is a modified version of my MCI-Commands.pb file. (I didn't release it on these forums, so no need to search)
Code: Select all
; This is a modified version of MCI-Commands.pb. Made by: Josku_X
Procedure.s GetShortFileName(LongFileName$)
Static ShortPathName$, RetVal, iLen
ShortPathName$ = Space(256)
iLen = Len(ShortPathName$)
RetVal = GetShortPathName_(LongFileName$, ShortPathName$, iLen)
ShortFileName$ = Left(ShortPathName$, RetVal)
ProcedureReturn ShortFileName$
EndProcedure
Procedure MCI_OpenFile(Alias$, FileName$)
ShortName$ = GetShortFileName(FileName$)
Command=mciSendString_("open " + Chr(34)+FileName$+Chr(34) + " type mpegvideo alias "+Alias$, 0, 0, 0)
If Command=0
ProcedureReturn #True
Else
ProcedureReturn #False
EndIf
EndProcedure
Procedure MCI_Close(Alias$)
ProcedureReturn mciSendString_("close " + Alias$, 0, 0, 0)
EndProcedure
Procedure MCI_GetLength(Alias$)
Buffer.s = Space(256)
mciSendString_("status " + Alias$ + " length", @Buffer, 256, 0)
ProcedureReturn Val(Buffer)
EndProcedure
SmallFile$=OpenFileRequester("Please select the small file.","","Everything|*.*",0)
LargeFile$=OpenFileRequester("Please select the large file.","","Everything|*.*",0)
If MCI_OpenFile("Small", SmallFile$)
SmallLength=MCI_GetLength("Small")
MCI_Close("Small")
EndIf
If MCI_OpenFile("Large", LargeFile$)
LargeLength=MCI_GetLength("Large")
MCI_Close("Large")
EndIf
Debug Str(LargeLength/SmallLength)+" Times"
EDIT:
Ps. the big file is over 1GB, the small is 10KBDs.
Are you sure those files are mp3's ???
EDIT2: I tested my code with some movies over 1gb and it is very fast, so you don't have to be afraid of slow loads. (my processor: 3.2 GHz Intel Pentium 4 HT)