[wdmaudiodev] Re: Kernel streaming question

  • From: Pallavi Joshi <pallavi.v.joshi@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Tue, 23 Jun 2009 17:46:00 -0700

Yes, the data format is supported by my USB.

I think I understand what you mean by data starving and that is what is
happening in my case. I am not sending multiple buffers. I do not have any
timer callbacks. I don't know much about them!

I will try and figure out how to do this timer stuff. So I need a timer
callback to tell my output device that the data is ready to be sent?

Thanks a lot for pointing it out.


On Tue, Jun 23, 2009 at 5:26 PM, Tim Roberts <timr@xxxxxxxxx> wrote:

> 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
> http://www.wdmaudiodev.com/

Pallavi Joshi

Other related posts: