|
|
Up |
|
|
  |
Author: Loren RogersLoren Rogers Date: Aug 21, 2008 09:48
Hey gang,
Simply stated, I can drop a DS Audio Capture filter and render
directly to a DirectSound render device in GraphEdit with a 1/2 second
delay. If in the same GraphEdit, I use the WDM streaming audio source
for my mic and attach to the same DirectSound renderer there is very
little delay. So it appears to me that the DS audio capture filter is
"adding" about 1/2 second delay under Vista. The same seems to be
happening using DirectSound technology. ANy ideas? I'm trying to
write an VoIP application and I'm getting that stupid 1/2 second delay
right out of the chute which is unacceptable.
/Loren
|
| |
|
| | 7 Comments |
|
  |
Author: Chris P.Chris P. Date: Aug 21, 2008 14:27
On Thu, 21 Aug 2008 09:48:26 -0700 (PDT), Loren Rogers wrote:
> Simply stated, I can drop a DS Audio Capture filter and render
> directly to a DirectSound render device in GraphEdit with a 1/2 second
> delay. If in the same GraphEdit, I use the WDM streaming audio source
> for my mic and attach to the same DirectSound renderer there is very
> little delay. So it appears to me that the DS audio capture filter is
> "adding" about 1/2 second delay under Vista. The same seems to be
> happening using DirectSound technology. ANy ideas? I'm trying to
> write an VoIP application and I'm getting that stupid 1/2 second delay
> right out of the chute which is unacceptable.
It's the default buffer size. The default sample size for the audio
renderer is 0.5 seconds. The default capture source accepts the 0.5 second
buffer size but the WDM stream source does not and modifies the size to
suit itself.
|
| |
|
| | no comments |
|
  |
Author: Loren RogersLoren Rogers Date: Aug 21, 2008 14:37
On Aug 21, 5:27 pm, "Chris P." chrisnet.net> wrote:
> On Thu, 21 Aug 2008 09:48:26 -0700 (PDT), Loren Rogers wrote:
>> Simply stated, I can drop a DS Audio Capture filter and render
>> directly to a DirectSound render device in GraphEdit with a 1/2 second
>> delay. If in the same GraphEdit, I use the WDM streaming audio source
>> for my mic and attach to the same DirectSound renderer there is very
>> little delay. So it appears to me that the DS audio capture filter is
>> "adding" about 1/2 second delay under Vista. The same seems to be
>> happening using DirectSound technology. ANy ideas? I'm trying to
>> write an VoIP application and I'm getting that stupid 1/2 second delay
>> right out of the chute which is unacceptable.
>
> It's the default buffer size. The default...
|
| Show full article (1.24Kb) |
| no comments |
|
  |
Author: Chris P.Chris P. Date: Aug 21, 2008 14:58
On Thu, 21 Aug 2008 14:37:06 -0700 (PDT), Loren Rogers wrote:
> Is there anything I can do to rectify this? My goal is to have 20ms
> worth of samples delivered from the capture source.
You should be able to use IAMBufferNegotiation at the output pin of the
capture source before connecting it to the renderer.
For some filters you have to use an intermediate filter to force the buffer
during the connection process but you shouldn't have to here.
|
| |
| no comments |
|
  |
Author: Loren RogersLoren Rogers Date: Aug 21, 2008 19:17
On Aug 21, 5:58 pm, "Chris P." chrisnet.net> wrote:
> On Thu, 21 Aug 2008 14:37:06 -0700 (PDT), Loren Rogers wrote:
>> Is there anything I can do to rectify this? My goal is to have 20ms
>> worth of samples delivered from the capture source.
>
> You should be able to use IAMBufferNegotiation at the output pin of the
> capture source before connecting it to the renderer.
>
> For some filters you have to use an intermediate filter to force the buffer
> during the connection process but you shouldn't have to here.
>
> -- http://www.chrisnet.net/code.htm
> [MS MVP for DirectShow / MediaFoundation]
Ya I see and you are right! However my "real" configuration is this,
and I would really appreciate if you could give me some guidance of
what I'm doing wrong because I'm still getting a delay in my
configuration...
|
| Show full article (1.51Kb) |
| no comments |
|
  |
Author: Chris P.Chris P. Date: Aug 22, 2008 09:43
On Thu, 21 Aug 2008 19:17:21 -0700 (PDT), Loren Rogers wrote:
> Ya I see and you are right! However my "real" configuration is this,
> and I would really appreciate if you could give me some guidance of
> what I'm doing wrong because I'm still getting a delay in...
|
| Show full article (1.40Kb) |
| no comments |
|
  |
Author: Loren RogersLoren Rogers Date: Aug 22, 2008 11:02
On Aug 22, 12:43 pm, "Chris P." chrisnet.net> wrote:
> On Thu, 21 Aug 2008 19:17:21 -0700 (PDT), Loren Rogers wrote:
>> Ya I see and you are right! However my "real" configuration is this,
>> and I would really appreciate if you could give me some guidance of
>> what I'm doing wrong because I'm still getting a delay in my
>> configuration.
>> Graph1: Capture (20ms samples 16KHz, 16 bits) to SampleGrabber, then
>> sample grabber to Null renderer. Null renderer is optional
>> Graph2: I created a custom CSource/CSourceStream "push" filter to push
>> media samples to default DirectSound renderer filter(speakers).
>> CSourceStream::DecideBufferSize() sets up the same params as I use in
>> the source's IAMBufferNegotiation
>> I "grab" 20 ms samples from SampleGrabber, and push the sample(s) onto
>> a queue.
>> Then, the CSourceStream::FillBuffer() (which is obviously looping),
>> then takes those samples and fills the IMediaSample passed to it.
>> I'm obviously doing something wrong here, and if you could point me in
>> the right direction, I'd appreciate it.
>
> Part 2 of the problem is that the DirectSound renderer has an internal 1 ...
|
| Show full article (1.82Kb) |
| no comments |
|
  |
|
|
  |
Author: Chris P.Chris P. Date: Aug 22, 2008 15:18
On Fri, 22 Aug 2008 11:02:16 -0700 (PDT), Loren Rogers wrote:
> I implemented the IAMPushSource on my output pin (CSourceStream) and I
> notice that the only
> method that get's called is GetPushSourceFlags, and I've attempted to
> set that flag (returned) to a different value all with the same
> results... an audio delay
Your flags value should be 0.
When running the graph bring up the audio renderer property page. Make
sure on the Advanced tab that it is showing the slaving mode as Live Graph
Clock.
|
| |
| no comments |
|
|