PC with Soundcard but not installes => Exception

Hi,

PC configuration:

soundcard but NOT installed

Problem:

Starting a player to play a sound file results in an exeception. the jmf.log says : "Failed to prefetch the player"

Can i catch this error? The normal try.. catch doesnt work.

I use a listener to react on controller events, but it has no effect.

the jmf stops my application completly. How can i react on such errors? sorry if this is a dumb question but i need some help.

thx in advance.

Magnus

btw. its important and immediately :)

[574 byte] By [242915] at [2007-9-26 7:59:21]
# 1

Hi,

you may want to check whether there is a sound card and it is enabled before creating the player. This method:

private boolean detectSoundcard() {

Line.Info il = new Line.Info(TargetDataLine.class);

return AudioSystem.isLineSupported(il);

} // detectSoundCard

returns true if a sound card is present and enabled. It even works with Applets (even unsigned).

Hope this helps,

Stefan

Stefan Hoba at 2007-7-1 18:17:02 > top of Java-index,Security,Cryptography...
# 2
Thx for your help, will try it.byeMagnus
242915 at 2007-7-1 18:17:02 > top of Java-index,Security,Cryptography...