Here my script
public static 开发者_JS百科int getMaxSimultaneousSounds(
AudioFormat playbackFormat)
{
DataLine.Info lineInfo = new DataLine.Info(
SourceDataLine.class, playbackFormat);
Mixer mixer = AudioSystem.getMixer(null);
int maxLines = mixer.getMaxLines(lineInfo);
if (maxLines == AudioSystem.NOT_SPECIFIED) {
maxLines = 32;
}
return maxLines;
}
it's return 1. So i cannot play sound simultaneously but on Windows XP SP2 it return 32 so i can sounds clearly.
How to fix this?
Note: I run Ubuntu 11.04 on VirtualBox
UPDATE: I have tried run on real Ubuntu 11.04(without virtual) but the result is same.
精彩评论