[wdmaudiodev] How do I allow a WASAPI stream to vari-speed in relation to the device?

This is more a WASAPI api question than a driver question, and so,
this is probably off topic, but I'm not getting any answers at Stack
Overflow, so I thought someone on this list might have an idea.

I'm writing an audio client using the WASAPI api. What I'm noticing is
if the audio hardware sample rate is adjusted, I get clicks and
drop-outs in my playback. Other WASAPI audio clients don't seem to
have this problem. I am using the event-driven technique in shared
mode. When my output wakes up, I find out how much space is available
(client buffer size - padding) and I write that many samples. If I
calculate the effective sample rate of output, it remains constant
(within the margin of error) even if I have modified the actual
hardware rate significantly. For example if I initialize the stream at
44100, the calculated output rate always hangs right around 44100,
even if I have the hardware actually running at 45000 or even higher.
This leads me to believe there's something I need to do to signal my
willingness to run at a rate other than than the initial nominal rate.
I've looked at the  AUDCLNT_STREAMFLAGS_RATEADJUST flag, and the
IAudioClockAdjustment API, but these don't seem related.

Any advice would be greatly appreciated!
Glenn Hughes
******************

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:

  • » [wdmaudiodev] How do I allow a WASAPI stream to vari-speed in relation to the device? - Glenn Hughes