Hello -
I have attempted to upgrade my 3D API to version 1.3 Beta. When I run my code, code that works with the previous API version, I get a runtime error when initializing my JavaSoundMixer. Does anybody know what is going on?
JavaSoundMixer javaSoundMixer = new JavaSoundMixer(environment);
javaSoundMixer.initialize();
if( javaSoundMixer != null )
{
boolean status = javaSoundMixer.initialize();
if( status )
{
System.out.println( "Sound Mixer Initialized.. " );
}
else
{
System.out.println( "AudioEngine Not Created properly" );
}
}
else
{
System.out.println( "AudioEngine Not Created properly" );
}
javaSoundMixer.initialize();
if( javaSoundMixer != null )
{
boolean status = javaSoundMixer.initialize();
if( status )
{
System.out.println( "Sound Mixer Initialized.. " );
}
else
{
System.out.println( "AudioEngine Not Created properly" );
}
}
else
{
System.out.println( "AudioEngine Not Created properly" );
}
the initialize line gets the following runtime error, though it does compile.
Exception occurred during event dispatching:
java.lang.IllegalThreadStateException
at java.lang.Thread.start(Native Method)
at com.sun.j3d.audioengines.AudioEngineThread.initialize(AudioEngineThread.java:181)
at com.sun.j3d.audioengines.javasound.JSThread.initialize(JSThread.java:810)
at com.sun.j3d.audioengines.javasound.JavaSoundMixer.initialize(JavaSoundMixer.java:134)
at DrivingEnvironment.<init>(DrivingEnvironment.java:87)
at DrivingEnvironment$1.actionPerformed(DrivingEnvironment.java:407)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
at java.awt.Component.processMouseEvent(Component.java:3717)
at java.awt.Component.processEvent(Component.java:3546)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2595)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
java.lang.IllegalThreadStateException
at java.lang.Thread.start(Native Method)
at com.sun.j3d.audioengines.AudioEngineThread.initialize(AudioEngineThread.java:181)
at com.sun.j3d.audioengines.javasound.JSThread.initialize(JSThread.java:810)
at com.sun.j3d.audioengines.javasound.JavaSoundMixer.initialize(JavaSoundMixer.java:134)
at DrivingEnvironment.<init>(DrivingEnvironment.java:87)
at DrivingEnvironment$1.actionPerformed(DrivingEnvironment.java:407)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
at java.awt.Component.processMouseEvent(Component.java:3717)
at java.awt.Component.processEvent(Component.java:3546)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2595)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Thank you for any help you may have on this subject.
David Refsland
Send and receive Hotmail on your mobile device: Click Here
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
