Re: DirectShow DirectSound microphone low-latency
- From: "Chris P." <msdn@xxxxxxxxxxxx>
- Date: Mon, 10 Sep 2007 18:51:40 -0400
On Mon, 10 Sep 2007 20:48:40 -0000, insidemethods@xxxxxxxxx wrote:
I'm modifying a pair of working DirectShow networking filters that use
UDP for low-latency video. What I need to do is add audio, so I'm
adding an Audio input pin (I will multiplex audio and video over the
same UDP port). For now I'm testing with a Logitech USB but want it to
work with any audio source filter (especially microphones).
The problem is I can't get the microphone to send me several packets
per second (the most apparently is 2). I need 20-30 per second or else
I can't achieve low latency. I don't know if this is a limitation in
Logitech but I doubt it. Initially I'm just using PCM audio, I will
add a codec later.
The audio pin on my NetSend filter has a GetMediaType that looks like
this (below). In this case, I believe I am getting 2 x 32000 byte
packets per second from the logitech. I thought because of the
SetSampleSize I would get 20 per second. Any ideas would be much
appreciated.
The problem is the default allocator used by the audio capture filter. It
defaults to buffers of 0.5 seconds.
In your input pin override NotifyAllocator(). Call
pAllocator->GetProperties() to get the current settings. Then call
pAllocator->SetProperties() with the modified settings (smaller buffer).
Check the pActual props to ensure you got what you want (not that there is
anything you could do to fix it).
--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
.
- Follow-Ups:
- Re: DirectShow DirectSound microphone low-latency
- From: insidemethods
- Re: DirectShow DirectSound microphone low-latency
- From: insidemethods
- Re: DirectShow DirectSound microphone low-latency
- References:
- DirectShow DirectSound microphone low-latency
- From: insidemethods
- DirectShow DirectSound microphone low-latency
- Prev by Date: DirectShow DirectSound microphone low-latency
- Next by Date: Re: Wave Header Confusion
- Previous by thread: DirectShow DirectSound microphone low-latency
- Next by thread: Re: DirectShow DirectSound microphone low-latency
- Index(es):
Relevant Pages
|