[wdmaudiodev] Re: Kernel streaming question

  • From: Pallavi Joshi <pallavi.v.joshi@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 24 Jun 2009 10:59:00 -0700

Yes, it makes sense. I measured the time it takes for my function to input
data(256 samples). It takes around 16 ms whereas it should be taking like ~6
ms. I do not know why that is the case. This is only true with USB. With the
laptop's default audio card it takes ~6 ms.

The data comes from the USB's audio capture pin. I have connected a MP3
player to the stereo input of my USB audio device....that's where the input
data comes from.

May be the input takes more time because USB operation is slow...is that a
possibility?

Thanks for your help,
Pallavi



On Wed, Jun 24, 2009 at 9:16 AM, Tim Roberts <timr@xxxxxxxxx> wrote:

> Pallavi Joshi wrote:
> >
> > 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.
>
> As I said, your audio device is a real-time device.  The data you send
> it are shipped to the speakers immediately.  You have to send it 176,400
> bytes every second in order to maintain continuous playback without any
> breaks.
>
> Think about it.  Let's say you send 44,100 bytes, then you wait for 1/2
> second.  Those 44,100 bytes will finish playing in 1/4 second, then the
> board has no more data.  The speakers will go silent for the next 1/4
> second.
>
> How are you generating the data now?  Where does the data come from?
>
> --
>  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/
>
>


-- 
Pallavi Joshi
(480)-280-2017

Other related posts: