[wdmaudiodev] Re: Kernel streaming question

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Tue, 23 Jun 2009 17:26:13 -0700

Pallavi Joshi wrote:
> I am feeding the data using DeviceIoControl with IOCTL_KS_WRITE_STREAM
> as the control code. The render pin is created using the KsCreatePin
> function from ksuser.dll. The buffer size is 512 and it is a 2
> channel, 16 bit PCM audio data. The sampling rate is 44.1 KHz.
> Its exactly the same way as it is done inside the DirectKS sample code.
> I do not know what you mean by two things: "timing" and "mismatch in
> data performance"?

Well, I wrote "data performance" when I really meant "data format"... 
Are you sure that your USB device accepts 44100 stereo 16-bit PCM?  (It
probably does -- it's a common format.)

An audio device is a real-time device.  It consumes data continuously. 
If you don't have more data in the queue when it runs out, the device
will "starve", and you get a short period of silence, which makes the
sound choppy.  A 512-byte buffer will only keep your device fed for 3
ms.  Are you sending multiple buffers down so that the device never
starves?  How do you guarantee that there is always data waiting?  Timer
callback?

-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

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

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: