简体   繁体   English

AudioSystem.getMixerInfo()在Java / gentoo中什么也得不到

[英]The AudioSystem.getMixerInfo() get nothing in Java/gentoo

I want to develop a speech recognition program on a robot. 我想在机器人上开发语音识别程序。 The robot has gentoo chroot installed. 该机器人已安装gentoo chroot。 When I call AudioSystem.getMixerInfo() , it returns nothing. 当我调用AudioSystem.getMixerInfo() ,它什么也不返回。

The JDK version is jdk-6u35-linux-i586. JDK版本是jdk-6u35-linux-i586。 There are many audio device in /dev/, as list below: / dev /中有许多音频设备,如下所示:

nao [0] /dev $ ls -l|grep audio
crw-rw---- 1 root audio  14,   4 Oct  3 02:33 audio
crw-rw---- 1 root audio  14,   3 Oct  3 02:33 dsp
crw-rw---- 1 root audio  14,   0 Oct  3 02:33 mixer
crw-rw---- 1 root audio  14,   1 Oct  3 02:33 sequencer
crw-rw---- 1 root audio  14,   8 Oct  3 02:33 sequencer2

Is there some config of linux or Java must be set for sound? 是否必须为声音设置Linux或Java的某些配置?

The package for that version of Java has an alsa USE flag. 该版本的Java的软件包具有alsa USE标志。 It is not clear whether it also has implicit support for OSS. 尚不清楚它是否也对OSS具有隐式支持。 The devices you listed are for OSS. 您列出的设备适用于OSS。 You shouldn't use native OSS these days unless you know what you're doing so check whether the alsa USE flag is enabled and that you have devices present in /dev/snd. 除非您知道自己在做什么,否则这些天不应该使用本机OSS,因此请检查alsa USE标志是否已启用以及/ dev / snd中是否存在设备。 aplay -L should return something useful. aplay -L应该返回有用的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM