[wdmaudiodev] AVStream audio buffer size==latency

  • From: Richard Lince <Richard.Lince@xxxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 24 Sep 2013 15:52:54 +0000

Hello, I have written an audio driver using the avstream framework, not 
portclass.
All is good except for the audio latency, 500ms by default. 

Q. How do you change this default?

Using DS GraphEdt.exe I can get around this using the IAMBufferNetiation 
interface, this will set the latency I require, 84ms. However this is not good 
'out of the box' default as the audio and video are not in sync. Typically a 
0x4000 byte buffer will hold 84ms of 48MHz audio.

I have already tried the following without success:
1. Setting the KSPIN_DESCRIPTOR_EX KSALLOCATOR_FRAMING_EX to reflect 0x4000
2. Use KsEdit on the pin at runtime to set the above structure again.
3. Setting an allocator dispatch routine handler in KSPIN_DISPATCH results in 
no calls into the driver.
4. Exposing property set KSPROPSETID_Connection, neither 
KSPROPERTY_CONNECTION_ALLOCATORFRAMING or 
KSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX have ever been invoked.

An addition observation is that no matter what is set by the working DS 
IAmBufferNegotiation interface in GraphEdt.exe, the buffer size is always 0x6e4 
(10ms latency in size) when the process handler is called. The audio endpoint 
reports the correct 84ms buffer and sound is in sync. This advocates that an 
intermediate step makes up the user requested latency/buffer size.

Thanks in advance people, I have run out of ideas..

Richard Lince,
Software Engineer.

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: