I am working on a Java applet that uses javax.sound.midi.sequencer to play a MIDI sequence. In order for this to work, the visitor needs to have a soundbank installed on his/her computer. Apparently, the Windows JRE doesn't come with a soundbank, and one has to be downloaded separately from http://java.sun.com/products/java-media/sound/soundbanks.html . However, it is possible to load a soundbank from a file without having to go through the installation process. So, that brings me to my question: does anyone know where I can find a redistributable (open source) JavaSound-compatible soundbank? Alternatively, is there any way that I can legally redistribute Sun's soundbanks from the URL above, without redistributing the entire JRE? I want to have a soundbank that my applet can load on-the-fly from a file.
问问题
2688 次
3 回答
1
JDK README和JRE README都包含一个处理音库的重新分发部分:
...供应商可自行决定将 JDK 的 soundbank.gm 文件包含在 JRE 的重新分发中。Java Sound 网站上提供了多个版本的增强型 MIDI 音库:http: //java.sun.com/products/java-media/sound/。这些替代音库可能包含在 JRE 的重新分发中。
这听起来像是可以重新分配它们,但只能作为 JRE 的一部分......
于 2010-07-01T17:22:42.850 回答
0
如果音库不存在,您链接到的页面声称会退回到硬件 MIDI 端口。
我想一个更好的问题是......你试过在没有 Soundbank 的情况下使用它吗?
顺便说一句,大多数浏览器都可以很好地播放 MIDI 文件,所以我不确定为什么你需要一个 Applet 来执行此操作,除非它是其他东西的背景声音。
于 2010-07-01T15:56:05.010 回答