When generating audio, why use sine waves and standard effects? Directly tell the sound-card how much electricity should be in the speaker/microphone wires many times per second as numbers from -1 to 1. Automatically finds good sound-card options and balances between linear interpolation speeds of consuming microphone buffer (and then any Java transform function per sample) and producing into speakers buffer and to keep delay between them small. Its really simple you only have to write 1...