Posted July 5, 201213 yr Which static lib could play mp3 from resource WITHOUT extracting the mp3 file to hard disk?C++ is prefered. Thank you buddies. Edited July 5, 201213 yr by alaphate
July 5, 201213 yr http://www.fmod.org/index.phpAt the very least, do a Google search first. This library should fulfil your needs, but i'm offering no guarantees.HR,Ghandi
July 6, 201213 yr Author Thank you.Fmod is very powerful, however, it uses fmod.dll.Where could I get a static lib without dll dependencies?Thanks.
July 6, 201213 yr This is not a static lib, it is a header file and i don't know if it fulfils your needs once again:http://code4k.blogspot.com.au/2010/05/playing-mp3-in-c-using-plain-windows.htmlPlaying a MP3 in c++ using plain Windows APIWhile playing a mp3 is quite common in a demo, I have seen that most demo are often using 3rd party dlls like Bass or FMod to perform this simple task under windows. But if we want to get rid off this dependency, how can we achieve this with a plain windows API? What's the requirements to have a practical MP3Player for a demo?Surprisingly, I was not able to find a simple code sample other the Internet that explain how to play a mp3 with Windows API, without using the too simple Windows Media Player API. Why WMP is not enough (not even talking about MCI - Media Control Interface which is even more basic than WMP)?The usage is then pretty simple :MP3Player player;// Open the mp3 from a file...player.OpenFromFile("your.mp3");// or From a memory location!player.OpenFromMemory(ptrToMP3Song, bytesLength);player.Play();while (...) {// Do here your synchro in the demo using ... double playerPositionInSeconds = player.GetPosition() ...}player.Close();http://xoofx.com/upload/TestMP3Player.zipHR,Ghandi
Create an account or sign in to comment