Patrick,
// check allocator framing KSALLOCATOR_FRAMING ksaf; ZeroMemory(&ksaf,sizeof(ksaf)); HRESULT hr = m_pIpPin->GetPropertySimple(KSPROPSETID_Connection, KSPROPERTY_CONNECTION_ALLOCATORFRAMING, &ksaf, sizeof(ksaf));
Sorry, but when I try to get an allocator handle by calling
KsCreateAllocator(_pPin->GetHandle(), &AllocatorFraming, &AllocatorHandle);
on my pin handle, I get return code 87. Before I got my KSALLOCATOR_FRAMING structure filled by calling
DeviceIoControl(_pPin->GetHandle(), IOCTL_KS_PROPERTY, &KsProp_Allocator_Framing, sizeof(KSPROPERTY), &AllocatorFraming, sizeof(AllocatorFraming), &lpBytesReturned, &_Packets[0].Signal);
So how can I get a valid allocator handle to pass it to
DeviceIoControl(AllocatorHandle, IOCTL_KS_PROPERTY, &KsProp_Allocator_Status, sizeof(KSPROPERTY), &ksstreamalloc_status, sizeof(ksstreamalloc_status), &lpBytesReturned, &_Packets[0].Signal);
to get my KSSTREAMALLOCATOR_STATUS structure filled? Is there a certain condition to be met for the handle passed to the KsCreateAllocator function?
Thank you!
Patrick
-----Ursprüngliche Nachricht----- Von: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] Im Auftrag von Jerry Evans Gesendet: Dienstag, 2. August 2005 18:22 An: wdmaudiodev@xxxxxxxxxxxxx Betreff: [wdmaudiodev] Re: WG: Optimal KS buffer sizes ?
Patrick
It seems incredible but true - there is simply no compliance requirement for
latency in the WDM driver. I've no idea what Microsoft plan for Vista but it
better be something smarter than the wretched,warped system that exists at the moment. Any 'softies around to comment ?
The KSSTREAMALLOCATOR_STATUS call works for PCI devices but not USB. With the hardware I've got here (various AC97 devices, Creative SBs etc) the call
always returns a value of 480 - i.e 10ms of buffering at 48K. This (coincidentally) is the value used in the AC97 example driver. Maybe we just
have a recurring case of copy & paste or some guidelines somewhere dictated the 10ms buffer. If you did have true AC97 compatible hardware you could try
rebuilding the DDK sample and see how well it works with smaller buffers.
Some time back the USB stack guy at Microsoft indicated that there was also 10ms of latency built into the USB stack - which about fits with my measurements. Check the archives for more details.
I've no idea what you are doing but if you must have consistent and known latency then either try hardware with ASIO drivers (which report latency and
allow much finer control) or use USB and insert your own driver. My original
hopes of offering low-latency via AC97 have completely faded though Michael Tippach (www.asio4all.com) seems to know a trick or two that I don't. You might try and ask him.
Jerry
As already asked in the question below, is there any way to get the latency of a KS filter from the moment it is read from my render buffer? I need to have a value for how long it takes for the streaming audio to be output (acoustically) by the sound hardware.
Thank you!
Patrick
-----Ursprüngliche Nachricht----- Von: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] Im Auftrag von Jerry Evans Gesendet: Donnerstag, 24. März 2005 16:52 An: wdmaudiodev@xxxxxxxxxxxxx Betreff: [wdmaudiodev] Optimal KS buffer sizes ?
A user is complaining that our KS audio system has around 70ms latency (RealTek AC97 chipset). The app has 2 buffers of between 384 and 512 samples. The audio quality is good (no glitching) - so this figure seems hard to believe unless more buffering is taking place further down the stack. Is there any way to query the device for buffer sizes etc ? What is KSSTREAMALLOCATOR_STATUS all about and can it help here ?
Thx
Jerry
******************
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.de/
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden:
http://mail.yahoo.de ******************
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/
******************
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/
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/
******************
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/