java 如何在java中播放mp3文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9890922/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to play mp3 files in java
提问by JMohasin
Possible Duplicate:
Playing .mp3 and .wav in Java?
可能的重复:
在 Java 中播放 .mp3 和 .wav?
Friends,
朋友们,
please tell me link if this question already exist:
如果这个问题已经存在,请告诉我链接:
I want to play sounds of alphabet letters encoded in mp3, with different variations while playing it.
我想播放 mp3 中编码的字母的声音,在播放时有不同的变化。
For example:
例如:
For the word "Apple" it would use 4 files: "A.mp3", "p.mp3", "l.mp3", "e.mp3". Also, I want to add some kind of delay between sounds, for example between "A.mp3" and "p.mp3" it would pause for 100 msecs and between "p.mp3" and "l.mp3" - 50 msecs.
对于“Apple”这个词,它将使用 4 个文件:“A.mp3”、“p.mp3”、“l.mp3”、“e.mp3”。另外,我想在声音之间添加某种延迟,例如在“A.mp3”和“p.mp3”之间,它会暂停 100 毫秒,在“p.mp3”和“l.mp3”之间暂停 - 50 毫秒。
Please tell me if there exists any class and/or attribute to do that.
请告诉我是否存在任何类和/或属性来做到这一点。
Also, I would like to know if it is possible to stop and resume it?
另外,我想知道是否可以停止和恢复它?
采纳答案by hilbert
you looked at these pages?
你看过这些网页吗?
http://introcs.cs.princeton.edu/java/faq/mp3/mp3.html
http://introcs.cs.princeton.edu/java/faq/mp3/mp3.html
http://www.morgenstille.at/blog/how-to-play-a-mp3-file-in-java-simple-and-beautiful/
http://www.morgenstille.at/blog/how-to-play-a-mp3-file-in-java-simple-and-beautiful/