E earthjumper Member Licensed User Oct 14, 2009 #1 Hallo, Is there any way to do This. ? I Have nothing found ! The FMOD library is very Big. And i must use the DLL from FMOD. Thanks
Hallo, Is there any way to do This. ? I Have nothing found ! The FMOD library is very Big. And i must use the DLL from FMOD. Thanks
B Byak@ Active Member Licensed User Oct 14, 2009 #2 you can play wav with sound() and MP3 with WMPlayer(from CMD)
E earthjumper Member Licensed User Oct 14, 2009 #3 Byak@ said: you can play wav with sound() and MP3 with WMPlayer(from CMD) Click to expand... Thanks for the answer, but i don't want to play the wav/mp3, i want to have the length (milliseconds) of the file. is there any way to do it with .net?
Byak@ said: you can play wav with sound() and MP3 with WMPlayer(from CMD) Click to expand... Thanks for the answer, but i don't want to play the wav/mp3, i want to have the length (milliseconds) of the file. is there any way to do it with .net?
kolbe Active Member Licensed User Longtime User Oct 14, 2009 #4 You can do it manually by scanning for the mp3 header in each frame, then calculating the frame sized based on the bitrate and samplerate you read from each header and summing up the lengths of each frame. If you know it is a CBR file you can just do it for one header and trust that the frames don't vary. If it is VBR than you must check each frame if you want a reliable length. There is one catch and that is sometimes frames use padding and that will mess with these calculations a bit. Hope it helps
You can do it manually by scanning for the mp3 header in each frame, then calculating the frame sized based on the bitrate and samplerate you read from each header and summing up the lengths of each frame. If you know it is a CBR file you can just do it for one header and trust that the frames don't vary. If it is VBR than you must check each frame if you want a reliable length. There is one catch and that is sometimes frames use padding and that will mess with these calculations a bit. Hope it helps
B Byak@ Active Member Licensed User Oct 16, 2009 #5 earthjumper oups,sorry=) as kolbe say,you can find a documentation for MP3 format and then read a file as binary and find length
earthjumper oups,sorry=) as kolbe say,you can find a documentation for MP3 format and then read a file as binary and find length