Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123300

MidiSystem unavailable on Raspberry PI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 7u25
    • javafx
    • Raspberr PI running 2013-07-26-wheezy-raspbian.img and with
      jkd-8-ea-b104-linux-arm-vfp-hflt-21_aug_2013.tar.gz installed

          try {
            Synthesizer syn = MidiSystem.getSynthesizer();
          } catch (MidiUnavailableException e) {
            e.printStackTrace();
            System.exit(1);
          }
          try {
            syn.open();
          } catch (MidiUnavailableException e) {
            e.printStackTrace();
            System.exit(1);
          }

      When logged in as a normal user fails with
      javax.sound.midi.MidiUnavailableException: Can not open line
              at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:1132)
              at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:1036)
              at music.Synth.setup(Synth.java:42)
              at music.Synth.main(Synth.java:171)
      Caused by: java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian is supported.
              at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:479)
              at javax.sound.sampled.AudioSystem.getSourceDataLine(AudioSystem.java:606)
              at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:1066)
              ... 3 more

      As is quite common with the PI, it works fine when logged in as root.

      Regards
      Don

            stayer Kirill Kirichenko (Inactive)
            dscalesjfx Don Scales (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: