网速太慢,待续
step1:下载jmf
java media framework
已经放到附件中,可以直接下载
step2:简单的实例代码
package org.liujia.game.toolkit.manager.audiomanager;
import java.io.File;
import java.net.MalformedURLException;
import javax.media.Manager;
import javax.media.Player;
public class MediaPlayerTest{
public static void main(String[] args) throws MalformedURLException,
Exception {
File file = new File("xxxx.mp3");
Player audioPlayer = Manager.createRealizedPlayer(file.toURL());
// 这些方法看名字就知道了,你懂的
audioPlayer.start();
//audioPlayer.stop();
//audioPlayer.close();
}
}
step3:深入了解
相见http://www.bianceng.cn/Programming/Java/201103/24997.htm
step1:下载jmf
java media framework
已经放到附件中,可以直接下载
step2:简单的实例代码
package org.liujia.game.toolkit.manager.audiomanager;
import java.io.File;
import java.net.MalformedURLException;
import javax.media.Manager;
import javax.media.Player;
public class MediaPlayerTest{
public static void main(String[] args) throws MalformedURLException,
Exception {
File file = new File("xxxx.mp3");
Player audioPlayer = Manager.createRealizedPlayer(file.toURL());
// 这些方法看名字就知道了,你懂的
audioPlayer.start();
//audioPlayer.stop();
//audioPlayer.close();
}
}
step3:深入了解
相见http://www.bianceng.cn/Programming/Java/201103/24997.htm