Re: DirectShow DirectSound microphone low-latency

Tech-Archive recommends: Speed Up your PC by fixing your registry



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]
.



Relevant Pages

  • Re: Encoding WMV
    ... >>use the ASF Writer filter without enabling the Audio input pin? ... "Because the Windows Media Format SDK requires an audio stream to work, ... WM ASF Writer must always have an input audio pin, even if it is for a dummy ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: How not to render audio when using RenderFile()?
    ... I can't enumerate media types on the decoder's input pin. ... Would you know why audio decoder filter does not let me enumerate its media ... Write your own sink filter that only accepts audio and that keeps ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: DirectShow DirectSound microphone low-latency
    ... UDP for low-latency video. ... What I need to do is add audio, ... In your input pin override NotifyAllocator(). ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: How to let MSN recognize a DSHOW audio source filter as a audio source device in MSN audio/video
    ... In the lowermost diagram... ... Audio Capture Device: ... How could I add a input pin to my DSHOW audio source ... Capture Device, I guess maybe I can try, and how to do it? ...
    (microsoft.public.win32.programmer.directx.audio)
  • DirectShow DirectSound microphone low-latency
    ... UDP for low-latency video. ... What I need to do is add audio, ... The audio pin on my NetSend filter has a GetMediaType that looks like ...
    (microsoft.public.win32.programmer.directx.audio)