1

I'm creating a VOIP server & client system, but only 1/amount of users connected of the voice packets are played. I think it's because it can only play one stream of audio from one TargetDataLine, and only one TargetDataLine per device. And I'm writing multiple audio streams to it each second.

I'm calling line.write(t, 0, t.length); where line is my TargetDataLine, and t is my byte array containing samples. Is there a way to combine multiple audio streams into one mono stream before redistributing between clients?

Leif Gruenwoldt
  • 13,561
  • 5
  • 60
  • 64
user2507230
  • 562
  • 1
  • 3
  • 12

1 Answers1

0

I figured it out(I was googling wrong), you just need to add the samples together, and bitwise and it to the frame size.

user2507230
  • 562
  • 1
  • 3
  • 12