Skip to content
Advertisement

Pc audio to android = noise

I have a problem with a project of mine. The project is a voice chat, where you should be able to talk to each other across devices. The project works fine when 2 pc clients is talking. When a pc client is talking and the android device gets the data, it is filled with noise. I can faintly hear what is being said. Do anybody know what i can do to filter out the noise?

All the code is here

PC Client:

JavaScript

DataPacket.java:

JavaScript

Login.java:

JavaScript

Server.java:

JavaScript

ANDROID

MainActivity.java

JavaScript

As far as i can see, the PC settings matches the Android settings AudioFormat and AudioTrack.

Advertisement

Answer

So I know this is pretty late but I encountered the same problem.

JavaScript

In the audio format the last value needs to be false. The bigEndian Flag it changes the byte order in the stream.

So just change the last value to false and your code will work.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement