OMG DirectShow

Started by
5 comments, last by micepick 21 years, 2 months ago
I originally posted this in the For Beginners forum, but I think this is probably a better place for this. For some reason, DirectShow really sucks at playing MP3s on my computer. I thought there might be something wrong with my code, but after downloading a sample MFC DirectShow-based MP3 player that had the same problems, I was convinced otherwise. Most mp3s play with ridiculous amounts of stuttering. Some of them degenerate into complete garbage (i.e. a bunch of little beeps). Of course, all my other MP3 playing apps have no such problems. I''m using Win XP Pro, DirectX 8.1. Someone, help me out here please.
Advertisement
What does your Windows message loop look like ?

If you aren''t pumping messages or are doing something to hog the CPU, then DShow and other stuff will react badly. This includes altering thread and process priorities incorrectly (I''ve seen some people who think that setting their process and thred priority to realtime will improve their framerate - baaaad plan when you consider what half of the virtual memory setup is running on).


Do the SDK DirectShow samples stutter in the same way? If not, then I''d definately say its time to pick your message handling and other stuff to pieces.

If the SDK samples also stutter then IMO you have a hardware/driver issue - particularly if it only happens when there''s a high amount of graphics load. Triple check those mobo drivers and AGP aperture sizes...

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This is very strange. Yes, the "Jukebox" sample from the SDK has the same problems. I tried a bunch of different formats and MP3 is the ONLY one that has this problem. Even more strangely, the Jukebox will even play DivX files flawlessly, even though their audio is encoded in MP3 format.

Does that sound like a hardware/driver issue?
It could also be a filter issue - could be the Mp3 decoder filter is a little "demanding" in it''s setup. Stuttering sounds to me like there are not enough buffers assigned on both sides of the filter.

Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)
RegardsThomas TomiczekTHONA Consulting Ltd.(Microsoft MVP C#/.NET)
it seems to work fine for me.

My Homepage
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
quote:Original post by thona
It could also be a filter issue - could be the Mp3 decoder filter is a little "demanding" in it's setup. Stuttering sounds to me like there are not enough buffers assigned on both sides of the filter.


Is this fixable? I currently know next to nothing about DirectShow.

BTW, here's part of the SDK's track3.mp3 played with the Jukebox sample. track3.mp3 plays fine in RealPlayer.

track3.mp3 DirectShow Edition

EDIT: piano.mp3 and piano2.mp3 play fine, though! I think I'm going crazy.

[edited by - micepick on February 2, 2003 5:37:57 PM]
W00t, problem solved!

After fiddling with the graphview tool, I decided that it was probaly my AC3 filter that was buggy/screwed up. I found the file and renamed it to something else so DirectShow couldn''t find it. It was automatically replaced with a (functional) MPEG decoder, and everything is now fine.

One more request: is there a way to change DirectShow''s default filters so I don''t have to resort to removing my AC3 filter to get my MP3s working?

This topic is closed to new replies.

Advertisement