提交 c16f634f 编写于 作者: A amenkov

7026275: TEST_BUG: test/javax/sound/sampled/Clip/ClipSetPos.java throws...

7026275: TEST_BUG: test/javax/sound/sampled/Clip/ClipSetPos.java throws uncatched IllegalArgumentException
Reviewed-by: dav
上级 76f35bc9
......@@ -33,6 +33,7 @@
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineUnavailableException;
public class ClipSetPos {
......@@ -48,12 +49,16 @@ public class ClipSetPos {
boolean testPassed = true;
Clip clip = null;
try {
clip = AudioSystem.getClip();
clip = (Clip)AudioSystem.getLine(new DataLine.Info(Clip.class, audioFormat));
clip.open(audioFormat, dataBuffer, 0, dataBuffer.length);
} catch (LineUnavailableException ex) {
log(ex);
log("Cannot test (this is not failure)");
return;
} catch (IllegalArgumentException ex) {
log(ex);
log("Cannot test (this is not failure)");
return;
}
log("clip: " + clip.getClass().getName());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册