View Single Post
Old 04-06-2008, 11:17 AM   #1506
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,775
A quick update on MA3 -
I've been stuck for several days trying to figure out how to allow the program to play music. The user will be allowed to build a playlist from music files on their machine. Dealing with text strings and file paths has never been my type of programming, but I was slowly making headway until I tried to play a default sound track that will be imbedded in the program's Resource file.

Within DirectX, MP3 files must be played with DirectShow, instead of the more intuitive DirectSound or DirectMusic. It would be nice if there was a simple command like LoadFile() to load the sound file, but nooooo. The commands are so arcane, unintuitive, and undocumented as to be almost useless to an amateur programmer like me. To load a file, the command IGraphBuilder::RenderFile() must be used, but it will only load a file from disk or a web URL, not from the application's own Resource. I just spent three full days scouring the Internet and Microsoft docs, not finding any useful info at all on this subject.

Finally, last night I posed a question about this on the Microsoft Developer's Network Forum, and this morning I got an answer that kind of, sort of, points in the right general direction. It will take some detective work to track down all the clues, but at least it's a lead.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote