@paulscode:
[quote=“paulscode,post:32,topic:37148”]
I have no idea how recent they are, but a link I’ve brought up earlier in this thread suggests that they’re at least fairly recent. Even if it is a hindrance, I think it’s fair to tell users to update their JRE version. At least it’s better than having to tell them to specifically use either an Oracle JRE or OpenJDK, which is what I’ve been dealing with so far.
Anyway, thank you for posting a test. I’m using Linux Mint 11 32bit with the Oracle JVM 1.6 update 26. First, I tried the Bullet/Target Collision applet with nothing else running (i.e. no Flash or anything) and got sound:
Starting up SoundSystem...
Initializing Java Sound
(The Java Sound API. For more information, see http://java.sun.com/products/java-media/sound/)
Mixer 'NVidia [plughw:0,0]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 32
Acceptable: true
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 9
Mixer 'NVidia [plughw:0,1]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 32
Acceptable: true
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 9
Mixer 'NVidia [plughw:0,2]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Mixer 'Generic [plughw:1,3]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 32
Acceptable: true
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 9
Mixer 'Port NVidia [hw:0]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Mixer 'Port Generic [hw:1]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Attempting to use Mixer 'NVidia [plughw:0,0]'
JavaSound initialized.
Java version is: 1.6.0_26
-> support for BufferedImage
Version helper for 1.5+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
Adding Lightsource: 0
Software renderer disposed
Next, I tried the same with a Flash video running at the same time; no sound here:
Starting up SoundSystem...
Initializing Java Sound
(The Java Sound API. For more information, see http://java.sun.com/products/java-media/sound/)
Mixer 'NVidia [plughw:0,0]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Mixer 'NVidia [plughw:0,1]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 32
Acceptable: true
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 9
Mixer 'NVidia [plughw:0,2]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Mixer 'Generic [plughw:1,3]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 32
Acceptable: true
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 9
Mixer 'Port NVidia [hw:0]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Mixer 'Port Generic [hw:1]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Attempting to use Mixer 'NVidia [plughw:0,1]'
JavaSound initialized.
Java version is: 1.6.0_26
-> support for BufferedImage
Version helper for 1.5+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
Adding Lightsource: 0
Software renderer disposed
Note that the “NVidia” mixers seem to be related to my soundcard (it’s an onboard soundcard). “NVidia [plughw:0,0]” is able to play sound from my speakers, but as you can see, if sound is already running, the maxmimum number of lines is zero. I have no idea what “NVidia [plughw:0,1]” is, but I can’t hear anything when that’s used.
The mixer called “Generic” is the HDMI port of my graphics card, so I wouldn’t want to use that.
Also, I seem to have the same problem that I can only hear the first sound (even in the first test). After I shoot the second laser in the applet, I get this on every shot:
Error in class 'ChannelJava Sound'
Unable to attach buffer to clip in method 'attachBuffer'
ERROR MESSAGE:
line with format PCM_UNSIGNED 11025.0 Hz, 8 bit, stereo, 2 bytes/frame, not supported.
STACK TRACE:
com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDevice.java:494)
com.sun.media.sound.DirectAudioDevice$DirectClip.implOpen(DirectAudioDevice.java:1280)
com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:107)
com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1061)
com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1028)
paulscode.sound.libraries.ChannelJavaSound.attachBuffer(ChannelJavaSound.java:278)
paulscode.sound.libraries.SourceJavaSound.play(SourceJavaSound.java:311)
paulscode.sound.Library.play(Library.java:706)
paulscode.sound.Library.play(Library.java:675)
paulscode.sound.SoundSystem.CommandPlay(SoundSystem.java:2076)
paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2599)
paulscode.sound.CommandThread.run(CommandThread.java:121)
This error applies to both tests.
For comparison, on OpenJDK (version 1.6 update 22), everything seems to be working fine. Here is the console output:
Starting up SoundSystem...
Initializing Java Sound
(The Java Sound API. For more information, see http://java.sun.com/products/java-media/sound/)
Mixer 'default [default]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 32
Acceptable: true
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 9
Mixer 'NVidia [plughw:0,0]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Mixer 'NVidia [plughw:0,1]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 32
Acceptable: true
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 9
Mixer 'NVidia [plughw:0,2]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Mixer 'Generic [plughw:1,3]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 32
Acceptable: true
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 9
Mixer 'Port NVidia [hw:0]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Mixer 'Port Generic [hw:1]'
Exists: true
Minimum Sample Rate: 4000
Acceptable: true
Maximum Sample Rate: 48000
Acceptable: true
Maximum Lines: 0
Acceptable: false
Gain Control: false
Pan Control: false
Sample Rate Control: false
Total Rank: 0
Attempting to use Mixer 'default [default]'
JavaSound initialized.
Java version is: 1.6.0_22
-> support for BufferedImage
Version helper for 1.5+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
Adding Lightsource: 0