You can use DirectShow, but it is no longer part of DirectX, or rely on a third-party library like Bass , FMod , mpg123, or even libwmp3 .
If you no longer want to use DirectShow (but why change if your existing code continues to work?), You can use MCI :
mciSendString("open la_chenille.mp3 type mpegvideo alias song1", NULL, 0, 0); mciSendString("play song1", NULL, 0, 0); mciSendString("close song1", NULL, 0, 0);
Gregory Pakosz
source share