代码搜索结果
找到约 10,000 项符合
Audio 的代码
e556. loading and playing audio in an application.txt
try {
URL url = new URL("http://hostname/audio.au");
AudioClip ac = Applet.newAudioClip(url);
ac.play();
} catch (MalformedURLException e) {
}
e555. loading and playing audio in an applet.txt
// See also e551 The Quintessential Applet
public void init() {
// Load audio clip
AudioClip ac = getAudioClip(getDocumentBase(), "http://hostname.com/audio.au");
e717. playing streaming midi audio.txt
Supported audio file formats: mid, rmf
try {
Sequencer sequencer = MidiSystem.getSequencer();
sequencer.open();
// From file
InputStream is = new Buffer
e716. loading and playing midi audio.txt
Supported audio file formats: mid. See also e717 Playing Streaming Midi Audio.
try {
// From file
Sequence sequence = MidiSystem.getSequence(new File("midifile"));
e723. loading and playing sampled audio.txt
Supported audio file formats: aif, au, and wav. See also e724 Playing Streaming Sampled Audio.
try {
// From file
AudioInputStream stream = AudioSystem.getAudioInputStream(new
e724. playing streaming sampled audio.txt
try {
// From file
AudioInputStream stream = AudioSystem.getAudioInputStream(new File("audiofile"));
// From URL
stream = AudioSystem.getAudioInputStream(new