How can i do that ?!
How can i do that ?!
Do you really think playing MP3s is so trivial? You can call upon other programs to do the playing (as the above line does - it opens your standard media player), but playing an MP3 yourself is not trivial. You need to decode it, and you need to send the decoded data to the soundcard. Complicated.Code:ShellExecute(0, TEXT("open"), path, 0, 0, SW_SHOWNA);
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
I dont want to really read the mp3 file convert it and play it, i just want to add to my application a backround music from mp3 i have.
How do i do that ?
i tried to use ShellExecute, but Visual studio 2005 doesnt reconize it... :\
DirectShow is the simplest way to do this short of using a third party library. Keep in mind that DirectShow is no longer a part of DirectX and is available in the Platform/Windows SDK (for XP). They are planning on removing DirectShow completely but I'm not sure if they have or not. They might as well since they already removed everything that is of worth in XP from Vista.
Er, how will the myriad of video players work, then?
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
I learned it way back when I began writing my DXShowWnd class which wrapped DirectShow. At first I thought it odd that it was no longer in the DX SDK. So I found out it was in the Platform SDK and that eventually it would be merged into something completely different in future versions. I'm not sure if that still holds true today.
Microsoft changes fundamental designs in the blink of an eye. Unfortunately those decisions have far reaching impacts and are a pain in my arse.
Or you could just make your own background music using system beeps lol. They are featured in the windows library, super easy too! But as he said, it's complicated.