List of usage examples for javax.sound.sampled Mixer getMaxLines
int getMaxLines(Line.Info info);
From source file:SoundManagerTest.java
/** * Gets the maximum number of simultaneous sounds with the specified * AudioFormat that the default mixer can play. *//*from ww w . j a v a 2 s . co m*/ public static int getMaxSimultaneousSounds(AudioFormat playbackFormat) { DataLine.Info lineInfo = new DataLine.Info(SourceDataLine.class, playbackFormat); Mixer mixer = AudioSystem.getMixer(null); return mixer.getMaxLines(lineInfo); }