Jump to content

MidiUnavailableException: Audio Device Unavailable

- - - - -

  • Please log in to reply
No replies to this topic

#1
ksemeks

ksemeks

    Learning Programmer

  • Members
  • PipPipPip
  • 57 posts
Hi, so here's the deal.
When I try to make a new Sequencer object, java throws this exception: javax.sound.midi.MidiUnavailableException: Audio Device Unavailable

Here's the whole error:
javax.sound.midi.MidiUnavailableException: Audio Device Unavailable
	at com.sun.media.sound.MixerSynth.implOpen(MixerSynth.java:165)
	at com.sun.media.sound.AbstractMidiDevice.doOpen(AbstractMidiDevice.java:144)
	at com.sun.media.sound.AbstractMidiDevice.openInternal(AbstractMidiDevice.java:134)
	at com.sun.media.sound.AbstractMidiDevice.getReceiverReferenceCounting(AbstractMidiDevice.java:339)
	at javax.sound.midi.MidiSystem.getReceiver(MidiSystem.java:243)
	at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:442)
	at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:348)
	at MiniMusicPlayer1.main(MiniMusicPlayer1.java:9)

And here's the code i want to compile, well actually, a scratch of code:
import javax.sound.midi.*;

public class MiniMusicPlayer1
{
	public static void main(String[] args)
	{
		try
		{
			Sequencer sequencer = MidiSystem.getSequencer();
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}

On the ##java chanell on freenode they told me that this is a OS problem.
I am running Archlinux. I've tried to run the code as root, but the result was the same.
I've tried to find all the processes which uses my sound card and start killing them with the SIGKILL flag, but the output was still the same.
Then I tried to strace the program, but i didn't find anything relevant, but that's me, I don't really know what an strace output should look like, so here's the output. ( I found some No such file or directory referencing to some libs ).
strace.log

I really hope someone here could help me with this issue.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users