Jump to content
  • Advertisement

Archived

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

snowball123

DirectShow MP3

This topic is 5861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
You need to remove the first set of filters from the graph prior to inserting the filters for the second file.
Or destroy the graph object and recreate it.

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!