Change the 16000 in the following line:
shortBuffer.put((short)(16000*sinWave));
to something much smaller (like 100). Apparently with the amplitude
too high there is a lot of clipping going on. I'm not familiar with
the Java audio so I don't know if there is somewhere else in the Audio
System that you can attenuate the amplitude.
Also, it seems that where you write data from playBuffer into
sourceInputLine you need to check if there is available space.
Bruce A. Johnson,
One Moon Scientific, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden