Forum > Problem with sound

Mstislav
Joined: Dec 09
2012-09-05, 11:04
Hello,

The following error message displays when a sound has to be to play:

javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 22050.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.

com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDevice.java:539)
com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:124)
com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:416)
pazaakcantina.SoundClip$1.run(SoundClip.java:102)


This message display on my debian 6.0.5.

DarthRevan
Joined: Nov 09
2012-09-11, 12:48
It seems, that the playback of the audio files is not supported on your system. The audio files are in a specific format which must be supported by the audio system. Otherwise this exception occurs. Perhaps you could try another audio device or audio driver.
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

Mstislav
Joined: Dec 09
2012-09-11, 12:54
I understands that it has to be a problem with my sound card but the biggest problem has my opinion is the exception which block completely the game because of the error message.

DarthRevan
Joined: Nov 09
2012-09-11, 13:02
I see. Perhaps I will add an option to start the game without sound or something like this.
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

Mstislav
Joined: Dec 09
2012-09-11, 13:12
I know, it is what I wanted to make but as I told it the error message to block the game all that I have success has to make it is to login me without using the mouse.

DarthRevan
Joined: Nov 09
2012-09-11, 13:18
You could perhaps try to use a null audio device. This would completely disable the sounds, but would make the game playable..
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

Silent_Hunter
Joined: Oct 12
2012-10-02, 22:42
I have this issue as well. And I know my sound card can play them, because they work in mplayer. So it must be an issue with java. How do I change which audio device Java uses?
Silent-Hunter

DarthRevan
Joined: Nov 09
2012-10-04, 11:30
A workaround to this problem is:

1. Exit Pazaak Cantina, if running.
2. Find the location of Java preference files on your system (Google e.g. "java Preferences location")
3. Set the following keys to false: SoundTurn, SoundControl, SoundEvent, SoundCard
4. You might want to set the key Music to 0.
5. Save the modified preference file (exit registry on Windows)
6. Start Pazaak Cantina

This will disable all sounds in PazaakCantina.

Standard location of java preference files:
OSX: ~/Library/Preferences/com.apple.java.util.prefs
Linux: Might be: ~/.java
Windows: Registry path: HKEY_CURRENT_USERSoftwareJavaSoftPrefspazaakcantina
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)