Java仿千千静听音乐播放器源代码(21)
发布时间:2021-06-06
发布时间:2021-06-06
Java仿千千静听音乐播放器源代码 自己收集的。
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.LineUnavailableException;
public class SoudPlayer extends Thread {
public void run() { try { line = (SourceDataLine) AudioSystem.getLine(info); line.open(streamInput.getFormat()); line.start(); private void newObject() { } audioFormat = streamInput.getFormat(); info = new (SourceDataLine.class, audioFormat, 2048); start(); public SoudPlayer(File file) { } try { } streamInput = AudioSystem.getAudioInputStream(file); newObject(); e.printStackTrace(); return; public SoudPlayer(String path) { } File file = new File(path); try { } streamInput = AudioSystem.getAudioInputStreamnewObject(); e.printStackTrace(); return; AudioFormat audioFormat; AudioInputStream streamInput; SourceDataLine line; info; } catch (Exception e) { } catch (Exception e) {
上一篇:电子厂生产安全用电知识考试题
下一篇:樟宜机场服务品牌蓝背景