[wdmaudiodev] Re: Capture audio from USB Audio Device on XP (SP2)

  • From: "Edwin van den Oosterkamp" <edwin@xxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 15 Feb 2006 12:24:19 -0000

Hello Jerry,

I've not had much luck with the different values you recommended in your 
previous email. With these values I cannot create the capture pin for the USB 
Audio device. 

> When capturing do you first set the pin state to KSSTATE_PAUSE and then 
> KSSTATE_RUN?

What I do is the following -
- I create the capturing pin with the WAVEFORMATEX from my previous email.
- I prepare a couple of KSSTREAM_HEADER and OVERLAPPED structs.
- The (auto reset) events are created and filled in in the OVERLAPPED structs.
- The pin state is set to KSSTATE_RUN.
- The KSSTREAM_HEADERs are handed over to the pin together with a matching 
OVERLAPPED.

Then I use WaitForMultipleObjects to wait for completion events.

On Win2k and on PCI devices on XP these events then get signalled one-by-one. 
Each time an event is signalled the data of the matching header is copied into 
a buffer to be communicated to the rest of the app and the KSSTREAM_HEADER is 
prepared for another go (DataUsed  = 0) and handed back with its overlapped to 
the capturing pin. This will then continue for as long as the pin is running.

For USB devices on XP the events never get signalled.

Do you recommend manual reset events and putting the pin to pause before 
running it?

> If either of you wish email me directly and I can probably provide you with a 
> small test application.

I'll send you a separate private email for the test app - thank you for the 
offer, really appreciated.

Best regards,

Ing. Edwin van den Oosterkamp
R&D, MDO UK

 -----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jerry Evans
Sent: 15 February 2006 11:36
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Capture audio from USB Audio Device on XP (SP2)


Hauke,

Very strange. What hardware are you using?

When capturing do you first set the pin state to KSSTATE_PAUSE and then 
KSSTATE_RUN ?

Try requesting that the event object uses manual reset in CreateEvent() . 
Then when the event is signalled do the following:

1. Process the buffer that has just been signalled
2. Set the DataUsed member to 0 ( if this is not done the process will stall 
IIRC)
3. Reset the associated event
4. Resubmit the buffer etc to the input pin.

Have you looked at the actvity on the USB bus ? The evaluation version 
bushound utility (www.bushound.com) allows you to verify that the device is 
actually set into isochronous streaming mode.

If either of you wish email me directly and I can probably provide you with 
a small test application.

HTH

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.com/

Other related posts: