Is it possible to load an mp3 into directsound

Started by
10 comments, last by ShCiPwA 22 years, 1 month ago
Well, I have mailed you guys my basic MP3 class. It is by no means finished but it should give you a start.
If anyone else wants it:
mp3.zip

Edited by - shabaz on February 21, 2002 4:09:35 PM
Shabaz
Advertisement
An easy way to play MP3s un Windows (Using the Windows Media Player engine) :

Link your application with winmm.lib.

Then just call :

LPSTR LpReturnString;

mciSendString("open music.mp3 alias myfile",
lpszReturnString, lstrlen(lpszReturnString), NULL);

mciSendString("play myfile", lpszReturnString,
lstrlen(lpszReturnString), NULL);

And before you exit your app, you have to unload the sound :

mciSendString("close myfile", lpszReturnString,
lstrlen(lpszReturnString), NULL);


I'm currently using a similar technique with NeHe's AVI tutorial to decode the sound from AVIs, it works great.

Edited by - Terran Marine on February 22, 2002 3:01:00 AM

This topic is closed to new replies.

Advertisement