[wdmaudiodev] Re: Update for Capture Problem on WavePCI

  • From: "Martin Garcia" <doraemonx7@xxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 29 May 2003 02:23:06 +0000

Hi, Jeff,

Well, I think if under XP you do not use IPreFetchOffset and/or allow KMixer 
to do sample rate conversion, you will also have the problem under XP.

The fact you are also having the problem under 2000 really concerns me.

I was hopeful that if I only accept entire "packets" as you call them, that 
the problem would go away. I just tried that. But the problem does not go 
away. I also tried limiting the number of packets, but that did not make the 
problem go away.

I know that WaveCyclic model does not exhibit this behaviour...And, I know 
that Legacy Drivers do not exhibit this behaviour.

I am starting to worry that this is a WavePCI problem. I can tell you that I 
have tried every possible way I can think of to get that last "big" 
application buffer to come back with some data, but no matter what I do 
(except using the IPreFetchOffset and disabling KMixer conversion under XP), 
it will not come back with data.

It is critical for us to run under Win2k because many of our customers do 
so. We cannot use WaveCyclic (I don't want to get into that!) and many of 
our customers are complaining about Legacy drivers.

Amazingly, the driver passes WHQL tests...I am ready to go and certify it! 
But, I need to use KMixer SRC and I need to run under 2k, and I really need 
to get that last buffer!!

At this point, it looks like I will have to live with the problem...but, I 
guess I am surprised it has not come up before.

Since there are now at least two people with the problem, I wonder if 
someone from Microsoft has any input on this issue.

Anyway, Jeff, I really appreciate your time...it has been very helpful in 
narrowing down the problem and at least I have tried several avenues I had 
not explored before.

>From: "Jeff Pages" <jeff@xxxxxxxxxxxxxxxx>
>Reply-To: wdmaudiodev@xxxxxxxxxxxxx
>To: <wdmaudiodev@xxxxxxxxxxxxx>
>Subject: [wdmaudiodev] Re: Update for Capture Problem on WavePCI
>Date: Thu, 29 May 2003 10:17:52 +1000
>
>I've just written a similar test program and tried it out on my driver. I
>create two buffers each 128k long, and open waveIn with 8kHz sampling, 16
>bit stereo. I pass both buffers to the device, call waveInStart and then
>wait for five seconds. At that point I call waveInReset, then check the
>dwBytesRecorded fields of the headers.
>
>On Windows XP (SP1), the first buffer reports 128000 bytes recorded and the
>second buffer reports 31360 bytes recorded. This is what I would expect to
>see.
>
>On Windows 2000 (SP3), the first buffer reports 128000 bytes recorded and
>the second buffer reports 0 bytes recorded. Ouch! The WHDR_DONE bit is set
>on both buffers, but the second buffer is returned empty. Yet I don't have
>any problem with lost buffers in CoolEdit on that machine.
>
>I remember now that when I was writing my driver I did have a problem with
>CoolEdit recording on Windows 2000, but it wasn't lost buffers (at least I
>didn't notice any lost buffers then). Rather the counter would start
>counting up, then jump back to zero and start counting again. I fixed this
>by limiting the number of I/O packets that my driver holds in its internal
>queue (each I/O packet being indicated by a non-zero Flags value returned 
>by
>GetMapping). I chose a limit of 4 packets and that seems to work pretty
>well, and it eliminated my problem with CoolEdit.
>
>Jeff Pages
>
>----- Original Message -----
>From: "Martin Garcia" <doraemonx7@xxxxxxxxxxx>
>To: <wdmaudiodev@xxxxxxxxxxxxx>
>Sent: Thursday, May 29, 2003 8:28 AM
>Subject: [wdmaudiodev] Re: Update for Capture Problem on WavePCI
>
>
> > Hi,
> >
> > I have more information about my problem...
> >
> > The app in question allocates 128K buffers. I output (OutputDebugStr)
>return
> > of of those buffers along with my releasing of buffers from the driver. 
>As
> > long as I am not stopping, both the the app and driver are right in
>sync...
> >
> > But, after my driver receives the STOP command, the app never sees that
>last
> > buffer (thus losing what ever was put into that buffer). Later, I see 
>the
>
> > buffers return with zero bytes recorded.
> >
> > So, I think I have narrowed the problem somewhat...Why is Windows not
> > returning that last buffer to the application?  As I said before, I have
> > tried releassing just the partially filled mapping, all the outstanding
> > mappings, and not releasing any mappings (and allowing them to be
>revoked).
> > And I always have the same result.
> >
> > Sure enough...I changed the size of the user buffer from 128K to 4K. 
>Now,
> > the loss of the last buffer is not noticeable.
> >
> > The $64K question is: Why is that last buffer not comming back?!
> >
> > And, what does the IPreFetchOffset (and KMixer sample rate conversion)
>have
> > to do with this issue, if anything?
> >
> > I would like to say the app in question is wrong, but CoolEdit exhibits
>the
> > same behaviour...and the App in question has worked with other drivers 
>for
> > many years.
> >
> > Thank you for your time in considering my issue...
>
>
>******************
>
>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/
>

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

******************

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/

Other related posts: