[Java lista] hang linux alatt
Szomor Attila
aszomor at computertechnika.hu
2010. Feb. 11., Cs, 16:38:01 CET
If you have an microphone jack on your motherboard (or are using an audio
card), and you want to use a USB microphone, the Speech Submission applet
will connect to your on-board microphone, and ignore you USB microphone
(or only record at very low volumes).
This How-to shows you how to modify the sound.properties file of your Java
JRE (Java-run-time Environment) so that you can change the default audio
mixer from an on-board microphone to a different microphone (like a USB
mic).
Use arecord command to list the devices attached on your PC:
$ arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC883 Analog [ALC883 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 2: ALC883 Analog [ALC883 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
One of the listed devices will be your USB device
Modify your sound.properties file using the output from arecord (quote
taken from this post):
Note: With JDK 1.5, it is possible to use a sound.properties file in the
JRE\lib directory of your JDK installation. This sound.properties file can
be used to specify the default Mixer that will be used when
AudioSystem.getLine() is called for the various type of Line. In my case,
the sound.properties file contains:
javax.sound.sampled.Port=#Port SB Audigy Audio [C400]
javax.sound.sampled.Sourc#SB Audigy Audio [C400]
javax.sound.sampled.TargetDataLine=#SB Audigy Audio [C400]
The mixer name is placed after the # sign. These are actually the defaults
for my machine, so this file is not strictly necessary.
További információk a(z) Javalist levelezőlistáról