Search in sources :

Example 1 with SoftReceiver

use of com.sun.media.sound.SoftReceiver in project jdk8u_jdk by JetBrains.

the class GetMidiDevice method main.

public static void main(String[] args) throws Exception {
    AudioSynthesizer synth = new SoftSynthesizer();
    synth.openStream(null, null);
    Receiver recv = synth.getReceiver();
    if (((SoftReceiver) recv).getMidiDevice() != synth) {
        throw new Exception("SoftReceiver.getMidiDevice() doesn't return " + "instance of the synthesizer");
    }
    synth.close();
}
Also used : Receiver(javax.sound.midi.Receiver) SoftReceiver(com.sun.media.sound.SoftReceiver) SoftSynthesizer(com.sun.media.sound.SoftSynthesizer) AudioSynthesizer(com.sun.media.sound.AudioSynthesizer)

Aggregations

AudioSynthesizer (com.sun.media.sound.AudioSynthesizer)1 SoftReceiver (com.sun.media.sound.SoftReceiver)1 SoftSynthesizer (com.sun.media.sound.SoftSynthesizer)1 Receiver (javax.sound.midi.Receiver)1