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

Audio source filter with stereo samples

2 views
Skip to first unread message

sma...@hotmail.com

unread,
Apr 3, 2008, 2:35:30 PM4/3/08
to
Hi all,

I am developing a source filter with 1 audio output pin.
This filter is an audio parser that reads audio samples from a file.
The audio is stereo. So I am ending up with 2 buffers of data.

Now how do push them downstream in the FillBuffer method of my source
filter?

Thanx.

Alessandro Angeli

unread,
Apr 3, 2008, 2:48:16 PM4/3/08
to
From: "sma...@hotmail.com"

> I am developing a source filter with 1 audio output pin.
> This filter is an audio parser that reads audio samples
> from a file. The audio is stereo. So I am ending up with
> 2 buffers of data.

Assuming you have PCM data, if you have 2 buffers, you have
2 mono streams and not 1 stereo stream. To mix the 2 mono
streams into a single stereo stream, simply copy the samples
from the 2 buffers into a third buffer, alternating them:
121212...

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


0 new messages