Java Doc for AudioDelay.java in » 6.0-JDK-Modules » java-3d » com » db » media » audio » Java Source Code / Java DocumentationJava Source Code and Java Documentation
Recording and playing back the recorded data immediatelyPurpose
This program opens two lines: one for recording and one
for playback. In an infinite loop, it reads data from
the recording line and writes them to the playback line.
You can use this to measure the delays inside Java Sound:
Speak into the microphone and wait untill you hear
yourself in the speakers. This can be used to
experience the effect of changing the buffer sizes: use
the and options.
You will notice that the delays change, too.
LeveladvancedUsagejava AudioDelayjava AudioDelayParameterslists the available mixersselects a mixer to play onthe buffer size to use in the application ("extern")the buffer size to use in Java Sound ("intern")Bugs, limitations
There is no way to stop the program besides brute force
(ctrl-C). There is no way to set the audio quality.
The example requires that the soundcard and its driver
as well as the Java Sound implementation support full-duplex
operation. In Linux either use Tritonus or enable
full-duplex in Sun's Java Sound implementation (search the
archive of java-linux).