[wdmaudiodev] Re: Different amount of data in CopyFrom and CopyTo functions with same audio format.

  • From: Michail Nikolaev <michail.nikolaev@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 27 May 2009 02:10:08 +0400

>
> How big is your buffer?


Nevermind. It is about 4096 * 32 bytes. But if it will overloaded - i'll get
debug message. But problem is about empty buffer.

Stereo?  For both?


Stereo. For both.

Did you mean milliseconds there (as opposed to "ns" nanoseconds)?  Do
>
you get ANY data from Media Player?  That is, do you get buffers which
>
then stop, or do you get no buffers at all?



Hm. I think it microseconds(I have not WDK at current moment - i use
KeStallProcessor*
function).
Yes i get data from Media Player. I heard it. But because there is no data
in some moments - I write zeros (184 bytes). And it produces delay in sound.

Thanks, Michail.

2009/5/27 Tim Roberts <timr@xxxxxxxxx>

> Michail Nikolaev wrote:
> >
> > I develop analog of Virtual Audio Cable. It is put all output
> > data(from CopyTo) to cyclic (big)buffer. Then at CopyFrom puts data
> > from buffer do output(capture stream).
>
> How big is your buffer?
>
>
> > All streams(one capture and one render) supports only one format(the
> > same. 44100, 16 bit).
>
> Stereo?  For both?
>
>
> > CopyFrom and CopyTo function tries to synchronize theirs work (if
> > there is no data in buffer, or no space) by little delays.
> > When i use Winamp to render sound to my virtual device and
> > stdrec32.exe to record sound from my device - all works fine. Sound
> > without bugs and buffer is synchronized between CopyTo and CopyFrom
> > functions.
> >
> > But when I use Windows Media Player - ~every second CopyFrom function
> > can't read data for capture stream(there is no ~184 bytes). CopyFrom
> > function tries to wait data(for example - 10 times by 10 ns) - but
> > there is no result.
>
> Did you mean milliseconds there (as opposed to "ns" nanoseconds)?  Do
> you get ANY data from Media Player?  That is, do you get buffers which
> then stop, or do you get no buffers at all?
>
> --
> 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: