1) Yes, but how to modify the code for accepting input float[] frequencies, and output int[] buffer which will contain compound wave from all the frequencies?

2) How to rewrite the code without the use of sun.audio.*