Re: how do I access PCM data using DirectShow?


I'm about to write similar things for my application and just yesterday
found the DirectShow Multimedia Streaming Interfaces which look
very promising to me.
Have a look at the Multimedia Streaming Reference in the DShow Appendixes.
There is also an example that should have most of the code you need to
get at the PCM data. The file types you are able to stream seem
to depend on the available codecs on your system.
From my tests I can say that Real Media did not work, Windows Media
Audio did not work from within the IDE but should work outside.
All other formats I tested worked as expected.

hope this helps,

I have been reading and reading various articls on the MSDN site, but seem
be going in circles. I am using Visual C++ with the DirectX SDKs

I am building an application that requires me to build an oscilloscope
view of the audio data similar to most audio editors on the market today.
You can even see a similar thing in the Windows Sound Recorder. Basically
need to create a visual display of the waveform.

For the application that I am developing I need to be able to display the
visual waveform which will align to other events (similar to common video
editor software) except that this is to manage events to external devices.

At any rate .. I can create all of the custom controls, etc. once I have
audio PCM data. I thought about trying to use DirectMusic (not really
what I
need), DirectSound (only handles WAV), but ultimately ended up trying to
figure out how to use DirectShow. I am able to use the simplistic
to load such a wide variety of audio files without needing a bunch of

I read a bunch of articles on creating filters, but was thinking that it
should be MUCH more simple than that and I must be missing something ...
especially after I saw this in the DirectX SDK help

" ... just use DirectShow itself, which can do the decode for you; you can
then copy the resulting PCM audio data into your DirectSound buffers."

So I assume that somehow people understand how to copy the PCM audio data
I can't find a single interface.

Please help.