1

I'm writing an application in Java using the Java Sound libaray that will allow me to stream music from my personal library to whatever computer I'm on. It's going well. I've success streaming mp3s with the occasional crack or pop. However, on one of my test files, I experienced regular and frequent stop-and-go kind of behavior.

This, to me, says that I'm failing to put data in the SourceDataLine fast enough and that it's underflowing. Everything I've tried has not resolved this. I'm wondering if this has anything to do with how I'm getting the data bytes to begin with so I'm posting the method I'm using. That can be found here. The method I'm talking about is the top box. I'd modified it so that I'm getting the data, sending it over the network using Sockets, and writing it to the proper line on the client end.

Any ideas on what could cause this? I've tried reading up on audio files, but I'm not really making any headway into what would cause this. Thanks in advance.

starblue
  • 55,348
  • 14
  • 97
  • 151
SethGunnells
  • 1,269
  • 1
  • 12
  • 19

0 Answers0