开发者

TargetDataLine.getFramePosition() vs read()

What does "current" frame position actually mean? This does not described in documentation.

If I have just read some buffer from TargetDataLine and after that have called getFramePosition -- then this will be the position of

  1. first
  2. la开发者_如何学运维st
  3. other

frame in the readen buffer?


Looking at the documentation:

Obtains the current position in the audio data, in sample frames. The frame position measures the number of sample frames captured by, or rendered from, the line since it was opened. This return value will wrap around after 2^31 frames. It is recommended to use getLongFramePosition instead.

It would appear to me it would be the first frame since it counts since the line was opened.

Also, I would like to point out that the API specifies that getLongFramePosition is recommended to be used instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜