Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is DirectX and DirectShow the Same Thing?

128 views
Skip to first unread message

xp_n...@yahoo.com

unread,
Mar 3, 2008, 7:48:28 PM3/3/08
to
Is DirectX and DirectShow the Same Thing (in regard to audio only)?

If not, how does DirectX relate to DirectShow?

I am trying to learn how to write an audio play/record application. I
see nice introduction to DirectShow in the Microsoft Platform SDK.
But then I see that there is DirectX SDK that can also be used to
write play/record application.

Which one should I learn?

Thanks,
Alex

The March Hare [MVP]

unread,
Mar 3, 2008, 8:53:13 PM3/3/08
to
On Mon, 3 Mar 2008 16:48:28 -0800 (PST), xp_n...@yahoo.com wrote:

> Is DirectX and DirectShow the Same Thing (in regard to audio only)?

DirectX is a group of technologies. DirectShow is part of that group.

> If not, how does DirectX relate to DirectShow?

The DirectX SDK no longer contains DirectShow.

> Which one should I learn?

DirectShow. See my site through the link below for more info and links to
most dshow resources. For audio in particular, look at the link to Chris
P.'s site.

--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution

Chuck Walbourn [MSFT]

unread,
Mar 3, 2008, 8:57:30 PM3/3/08
to
DirectShow falls under the "DirectX" brand but has not been part of the
"DirectX SDK" since April 2005. The Windows SDK / Platform SDK is the
current shipping vehicle for using DirectShow.

Simple audio capture & playback can also be accomplished by using
DirectSound, which is in the DirectX SDK.

It really depends on what you are wanting to learn:

- DirectShow is primarily for video/audio playback, capture, and editing. It
is being slowly phased out in favor of the Windows Media Foundation APIs
starting with Windows Vista.

- XAudio2 is a new game-centric audio processing API releasing in the March
2008 DirectX SDK, and is the 'future' of game audio. It's focused on
digitial audio playback and digital signal processing. It does not include
MIDI or capture functionalty.

- DirectSound is the older game audio API, but it is still useful for some
situations. Windows Core Audio is supplanting this API in newer versions of
Windows starting with Windows Vista.

--
Chuck Walbourn
SDE, XNA Developer Connection

This posting is provided "AS IS" with no warranties, and confers no rights.


The March Hare [MVP]

unread,
Mar 4, 2008, 11:38:05 AM3/4/08
to
On Mon, 3 Mar 2008 17:57:30 -0800, Chuck Walbourn [MSFT] wrote:

> Simple audio capture & playback can also be accomplished by using
> DirectSound, which is in the DirectX SDK.

I think most people use dshow though which is why I pointed the OP to it
rather than dsound. (correct me if I'm wrong Chris P.)

> - DirectShow is primarily for video/audio playback, capture, and editing. It
> is being slowly phased out in favor of the Windows Media Foundation APIs
> starting with Windows Vista.

As you note, Vista forwards. There are no plans that I am aware of to port
MF to XP or prior Windows releases which makes it a lame duck for most app
developers. Also, MF does not (yet) have a framework for capture for audio
or video. The major interest in MF so far appears to be from people
interested in Vista's protected media path.

Chris P.

unread,
Mar 4, 2008, 1:16:23 PM3/4/08
to
On Tue, 4 Mar 2008 09:38:05 -0700, The March Hare [MVP] wrote:

> On Mon, 3 Mar 2008 17:57:30 -0800, Chuck Walbourn [MSFT] wrote:
>
>> Simple audio capture & playback can also be accomplished by using
>> DirectSound, which is in the DirectX SDK.
>
> I think most people use dshow though which is why I pointed the OP to it
> rather than dsound. (correct me if I'm wrong Chris P.)

It mainly comes down to file format support. If you want to support
multiple file formats and compression methods then DirectShow has a clear
advantage. If you are strictly using a single file format like WAV with no
compression then I'd skip DirectShow in favour of a simpler API.



>> - DirectShow is primarily for video/audio playback, capture, and editing. It
>> is being slowly phased out in favor of the Windows Media Foundation APIs
>> starting with Windows Vista.
>
> As you note, Vista forwards. There are no plans that I am aware of to port
> MF to XP or prior Windows releases which makes it a lame duck for most app
> developers. Also, MF does not (yet) have a framework for capture for audio
> or video. The major interest in MF so far appears to be from people
> interested in Vista's protected media path.

I agree. There will be general adoption of MF but not until it has general
support, back porting is required for such support. If they continue to
back port new features to Vista at least then it might start getting some
take up in 3-5 years.

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]

The March Hare [MVP]

unread,
Mar 4, 2008, 1:49:25 PM3/4/08
to
On Tue, 4 Mar 2008 13:16:23 -0500, Chris P. wrote:

> If you are strictly using a single file format like WAV with no
> compression then I'd skip DirectShow in favour of a simpler API.

You'd Probably use the waveIn/waveOut/mixer APIs rather than dsound though,
correct?

Chris P.

unread,
Mar 4, 2008, 2:00:01 PM3/4/08
to
On Tue, 4 Mar 2008 11:49:25 -0700, The March Hare [MVP] wrote:

> You'd Probably use the waveIn/waveOut/mixer APIs rather than dsound though,
> correct?

When latency is not a concern, yes. If targeting Vista only I would
consider using WASAPI as it is one level closer to the hardware.

xp_n...@yahoo.com

unread,
Mar 4, 2008, 4:39:25 PM3/4/08
to
Thanks everybody for your educating replies.

Things start to become clearer but I think that I need another
iteration of clarification:

I was aware that once upon a time there was waveIn/waveOut (MCI?).
Then it was replaced by something more advanced (DirectSound?) but I
had no idea that there was something in between called DirectShow
(where was I sleeping?)

So, I just need to clarify the following:

Is it correct to say that there are two audio API *families*: gaming
and non-gaming?

If so, then the non-gaming generations would go something like this:

waveIn/waveOut > DirectShow > Windows Media Foundation

And the gaming generations would go like this:

waveIn/waveOut > DirectSound > XAudio2 > Windows Core Audio

Did I get this right?

If not, what did I miss?

Thanks,
Alex

On Mar 4, 2:00 pm, "Chris P." <m...@chrisnet.net> wrote:
> On Tue, 4 Mar 2008 11:49:25 -0700, The March Hare [MVP] wrote:
>
> > You'd Probably use the waveIn/waveOut/mixer APIs rather than dsound though,
> > correct?
>
> When latency is not a concern, yes. If targeting Vista only I would
> consider using WASAPI as it is one level closer to the hardware.
>

> --http://www.chrisnet.net/code.htm

Alessandro Angeli

unread,
Mar 4, 2008, 6:22:50 PM3/4/08
to
From: "xp_n...@yahoo.com"

> If so, then the non-gaming generations would go something

[...]

Not quite, it's more like:

- audio I/O, at different levels
-- waveIn/waveOut -> WASAPI (and the rest of the Windows
Core Audio APIs in Vista)
-- DirectSound -> XACT2

- video output
-- GDI -> DCI -> DirectDraw -> Direct3D

- video input
-- VideoForWindows -> WDM/KS + BDA

- multimedia frameworks, which use the above audio/video I/O
APIs under the hood
-- ACM + VCM + MCI -> DirectShow -> MediaFoundation

- media formats
-- VideoForWindows (AVI+WAV) -> WindowsMedia (ASF)


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Chris P.

unread,
Mar 4, 2008, 6:30:45 PM3/4/08
to
On Tue, 4 Mar 2008 13:39:25 -0800 (PST), xp_n...@yahoo.com wrote:

> So, I just need to clarify the following:
>
> Is it correct to say that there are two audio API *families*: gaming
> and non-gaming?
>
> If so, then the non-gaming generations would go something like this:
>
> waveIn/waveOut > DirectShow > Windows Media Foundation
>
> And the gaming generations would go like this:
>
> waveIn/waveOut > DirectSound > XAudio2 > Windows Core Audio
>
> Did I get this right?

Kind of. You're pretty close on the gaming, except that XAudio2 is brand
new and not about to be replaced. On Vista they do have the choice to use
Core Audio instead but XAudio2 presents a nice easy wrapper over the down
and dirty system API's.

DirectShow, once known as ActiveMovie (Quartz) wasn't a replacement. It
was a new architecture to handle multimedia playback in a nice modular
fashion. It has filters that wrap system components such as waveIn/waveOut
and DirectSound output. Additionally it has filters designed for handling
specific file types to make multimedia file I/O easier. Additionally it is
extensible so you can write new filters to handle new file formats or do
specific tasks. So it really sits at a level above everything else. The
real reason it was dropped from games (before a replacement was available)
was codec hell. The games made presumptions that certain decoders were
available on the system and couldn't do anything about it if they weren't.
There's solutions to that problem such as using a decoder you can get
distribution rights to.

So really the evolution is:
System Audio
waveIn/WaveOut -> (DirectSound) -> Core Audio

Game Audio
waveIn/WaveOut -> DirectSound -> XAudio2

Multimedia Wrappers
MCI -> DirectShow -> Media Foundation (someday)

--

0 new messages