[wdmaudiodev] Re: DMA mode?

  • From: Pallavi Joshi <pallavi.v.joshi@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 12 Aug 2009 14:54:45 -0700

Hi Wade,

Thanks for responding. I am myself surprised why the output takes more time
than the input. What I mean is, the audio rendering is asynchronous. Thus
while I am outputing my audio data, I simultaneously input my audio data
which will be played during the next time slice. And this input is
synchronous i.e. I wait till the input operation is complete. While
debugging I noticed that the input is faster while the output is slower.
Could it be that since the output is asynchronous and the input is
synchronous, while I wait for the input to be done, the asynchronous output
(running on another thread) does not get the resources since they are being
used by the synchronous input at the same time. Hence the output operation
is slowed down. Is that a possibility?

I hope I was able to clearly explain the situation.

Thanks,
Pallavi



On Wed, Aug 12, 2009 at 2:31 PM, wade <wdawson61@xxxxxxxxx> wrote:

>   Hi Pallavi.  Assuming that your input and output run at the same sample
> rate, how can one be taking longer than the other?
> What do you mean by "My output is asynchronous while input is synchronous"
> ?
>
> -Wade
>
> --- On *Wed, 8/12/09, Pallavi Joshi <pallavi.v.joshi@xxxxxxxxx>* wrote:
>
>
> From: Pallavi Joshi <pallavi.v.joshi@xxxxxxxxx>
> Subject: [wdmaudiodev] Re: DMA mode?
> To: wdmaudiodev@xxxxxxxxxxxxx
> Date: Wednesday, August 12, 2009, 12:39 PM
>
>
>  Hi Tim,
>
> One last question, can you suggest a way of speeding things up in my case?
> As I said my output (rendering) takes more time than my input (capturing).
> My output is asynchronous while input is synchronous.
>
> Thanks,
> Pallavi
>
>
>
> On Tue, Aug 11, 2009 at 5:54 PM, Pallavi Joshi 
> <pallavi.v.joshi@xxxxxxxxx<http://mc/compose?to=pallavi.v.joshi@xxxxxxxxx>
> > wrote:
>
>> I meant the kernel streaming buffers that I am handing to usbaudio.sys
>> through IOCTL_KS_WRITE_STREAM.
>> Yah, I know I can't overwrite them. The problem is that the
>> playback(render) takes much longer than the capture operation. Hence the
>> overwriting issue. I wanted to speed up the playback operation by using DMA
>> buffers, but that is already in place looks like!
>>
>> Anyways, thanks a lot for replying.
>>
>> Pallavi
>>
>>
>>
>>
>>
>> On Tue, Aug 11, 2009 at 5:45 PM, Tim Roberts 
>> <timr@xxxxxxxxx<http://mc/compose?to=timr@xxxxxxxxx>
>> > wrote:
>>
>>> Pallavi Joshi wrote:
>>> >
>>> > Yup, I meant reducing the latency! Thanks so much for replying. This
>>> > is easy then :)
>>> >
>>> > The main issue that I am facing is that I overwrite the playback
>>> > buffer with new data before my previous data has finished playing.
>>> > This is what MSDN documentation says about asynchronous IO:
>>> > "Do not deallocate or modify the OVERLAPPED structure or the data
>>> > buffer until all asynchronous IO has been completed."
>>> >
>>> > Due to this, I get missing data in my audio stream. Do you have any
>>> > suggestions?
>>>
>>> I'm not sure, you have a lot of concepts mixed up here.  Which playback
>>> buffer are you overwriting?  Is it the application buffer that is being
>>> handed to your ASIO driver?  Is it the kernel streaming buffers you are
>>> handing to usbaudio.sys through IOCTL_KS_WRITE?
>>>
>>> The advice is good: you can't start reusing a buffer until you know the
>>> guy beneath you is finished with it, but the exact definition of
>>> "finished with it" depends on which level you're at.
>>>
>>> --
>>>  Tim Roberts, timr@xxxxxxxxx <http://mc/compose?to=timr@xxxxxxxxx>
>>> Providenza & Boekelheide, Inc.
>>>
>>> ******************
>>>
>>> WDMAUDIODEV addresses:
>>> Post message: 
>>> mailto:wdmaudiodev@xxxxxxxxxxxxx<http://mc/compose?to=wdmaudiodev@xxxxxxxxxxxxx>
>>> Subscribe:    
>>> mailto:wdmaudiodev-request@xxxxxxxxxxxxx<http://mc/compose?to=wdmaudiodev-request@xxxxxxxxxxxxx>
>>> ?subject=subscribe
>>> Unsubscribe:  
>>> mailto:wdmaudiodev-request@xxxxxxxxxxxxx<http://mc/compose?to=wdmaudiodev-request@xxxxxxxxxxxxx>
>>> ?subject=unsubscribe
>>> Moderator:    
>>> mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx<http://mc/compose?to=wdmaudiodev-moderators@xxxxxxxxxxxxx>
>>>
>>> URL to WDMAUDIODEV page:
>>> http://www.wdmaudiodev.com/
>>>
>>>
>>
>>
>>  --
>> Pallavi Joshi
>> (480)-280-2017
>>
>
>
>
> --
> Pallavi Joshi
> (480)-280-2017
>
>
>


-- 
Pallavi Joshi
(480)-280-2017

Other related posts: