MP3 Player
MP3 Player
Hi, on my computer this program works. The only thing is i have to agree to run it because avg pops up, but i think the windows media player try to connect with internet is causing the problem. Sometimes that will happen. So if you have virus/firewall software installed it can cause a problem.
best regards
best regards
MP3 Player
In my other machine doesn t work too, damm is there other way of doing this? ocx? 8-)
Or maybe is the path, i put my path like this:
c:somethingsomethingsomethingsoundsmymusic est.mp3
maybe the path is too long?
Or maybe is the path, i put my path like this:
c:somethingsomethingsomethingsoundsmymusic est.mp3
maybe the path is too long?
MP3 Player
I found a problem when the path has spaces in it.
try this:
mci.lpstrcommand="open "+chr$(34)+filename+chr$(34)+" type mpegvideo alias mysound"
btw., i removed the shortname :)
try this:
mci.lpstrcommand="open "+chr$(34)+filename+chr$(34)+" type mpegvideo alias mysound"
btw., i removed the shortname :)
MP3 Player
Nope, i must see what is going wrong with my s.o.
MP3 Player
Hmm, strange, i copied your code and made the change for the open statement.
Beside this, i suppose after something has been played it must be closed too?
Beside this, i suppose after something has been played it must be closed too?
MP3 Player
Hello Admin, i?m back again to the mp3 app and i have a question.
Would it be possible to get the amout of time that the file have to play?
example:
time -> 2 minutes the duration of the music
Would it be possible to get the amout of time that the file have to play?
example:
time -> 2 minutes the duration of the music
MP3 Player
hi, figured it out, see the example below
best regards
``get duration of a mp3 file
Declare mciSendString as "mciSendStringA" of "winmm.dll"
lpstrCommand As String
lpstrReturnString As String byaddress
uReturnLength As integer
hwndCallback As integer
result As integer
end declare
function GetMP3Duraton(filename as string) as integer
mciSendString.lpstrcommand="Open " + FileName + " alias SoundFile"
mciSendString.execute
mciSendString.lpstrcommand="Set SoundFile time format milliseconds"
mciSendString.execute
mciSendString.uReturnLength=256
mciSendString.lpstrcommand="Status SoundFile length"
mciSendString.execute
mciSendString.uReturnLength=0
mciSendString.lpstrcommand="Close SoundFile"
mciSendString.execute
result=val(mciSendString.lpstrReturnString)
end function
``testing the function
dim d as integer
d=GetMP3Duraton("music.mp3")`` in miliseconds
d=d/1000
showmessage str$(d)+"seconds"
best regards
``get duration of a mp3 file
Declare mciSendString as "mciSendStringA" of "winmm.dll"
lpstrCommand As String
lpstrReturnString As String byaddress
uReturnLength As integer
hwndCallback As integer
result As integer
end declare
function GetMP3Duraton(filename as string) as integer
mciSendString.lpstrcommand="Open " + FileName + " alias SoundFile"
mciSendString.execute
mciSendString.lpstrcommand="Set SoundFile time format milliseconds"
mciSendString.execute
mciSendString.uReturnLength=256
mciSendString.lpstrcommand="Status SoundFile length"
mciSendString.execute
mciSendString.uReturnLength=0
mciSendString.lpstrcommand="Close SoundFile"
mciSendString.execute
result=val(mciSendString.lpstrReturnString)
end function
``testing the function
dim d as integer
d=GetMP3Duraton("music.mp3")`` in miliseconds
d=d/1000
showmessage str$(d)+"seconds"
MP3 Player
Yeah i liked this,I think its a window problem,please install new window XP which is not complicated for use,and i think sound card problem also existed in your computer...please check the sound card