[wdmaudiodev] Re: - Problem with CopyFrom() - I copied less audio data than my expected.

  • From: Robert Bielik <robert.bielik@xxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 05 May 2011 14:25:38 +0200

Jun Jiang skrev 2011-05-05 14:19:
Sometimes(low frequency), CopyFrom() only copied partable data. For example, 
only 1344 bytes were copied. 2496 byte should be copied, too. But they were not 
copied actually.
What is reason to cause CopyFrom() copying less data?

It is probably a buffer wraparound effect, for example:

If the DMA buffer is of length N, and your CopyFrom copies M samples, if the 
DMA position is at a location P where
N - P < M, then first N - P bytes will be copied (in CopyFrom), then M - (N - 
P) bytes totalling M bytes.


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


Other related posts: