Archived

This topic is now archived and is closed to further replies.

snowball123

DirectShow MP3

Recommended Posts

Hi, I''m using DirectShow for an MP3 player. I want to play a MP3 file, once its done, the player will be play another MP3 file. My problem is that it plays both files. It runs through the first MP3 file. It stops the first MP3 file, then it loads the second MP3 file and plays it. But both are MP3 files are played at the same time (really kindy funny). Do I need to release all objects related to DirectShow? Or is there a way to get around this without releasing everything? Thanks

Share this post


Link to post
Share on other sites
Thanks for the earlier reply.

I''ve been destroying the graph and recreating it. That works well. But how do I remove the filter and add a new one for the next MP3?


I saw within the graph object there is this method called removeFilter or something. And I also saw addSourceFilter or do I load the next MP3 file like the previous one and it does all the work? I was wondering if you could help me out with this part, I would appreciate.


Again Thanks

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It''s fast enough to call the release method on the interfaces your''re using, and then recreate the graph.

Share this post


Link to post
Share on other sites
I got a nice skinned DirectShow MP3 Player up on my site. Full Source, check it out. It was hacked out pretty quick and is very sloppy but it got the job done. Unfortunetly it only play''s one MP3 but I used it in a game of mine and it played as many as you wanted (at the same time even). Check it out: www.CodeFortress.com in the Projects section way don in the bottom.

Share this post


Link to post
Share on other sites