If the Audio Player fails to open /dev/audio for any reason it cleeps for
1000 ms. inside of a synchronized method. Everything (including the
display) comes to a screeching halt during the 15 seconds it takes to
give up on the audio device. Other code that tries to access the audio
device is also blocked during that time because they cannot get access
to the synchronized method.
I am not sure why other threads including the display thread block
while the audio player is attempting to open the device. Could it be
something to do with the priority of the audio player? Is there any
way to allow other threads to run?
Reproduce by:
Run webrunner from mosaic using the webrunner home page. Go to
the bouncing heads page. Wait for a head to drify over and
touch the right side of the screen and watch the applet wedge
for 15 seconds.
Try to switch back to the main page during this 15 second pause.
1000 ms. inside of a synchronized method. Everything (including the
display) comes to a screeching halt during the 15 seconds it takes to
give up on the audio device. Other code that tries to access the audio
device is also blocked during that time because they cannot get access
to the synchronized method.
I am not sure why other threads including the display thread block
while the audio player is attempting to open the device. Could it be
something to do with the priority of the audio player? Is there any
way to allow other threads to run?
Reproduce by:
Run webrunner from mosaic using the webrunner home page. Go to
the bouncing heads page. Wait for a head to drify over and
touch the right side of the screen and watch the applet wedge
for 15 seconds.
Try to switch back to the main page during this 15 second pause.