Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic

reducing latency in real time audio on windows  RSS feed

Milan Krapek
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have problems with audio latency on TargetDataLine. I am using java 1.6 on Windows XP. It seems that java reads audio from system in 200ms chunks.

This is my audio capture code:

As you can see above, I am trying to use 160 bytes buffer. But when I check the data available in targetDataLine`s internal buffer I saw that the length of incoming data is 1600b.

Is there any way to force java to read audio data from system in smaller chunks (perhaps 160b)?

Thanks for any advice.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!