Menu

#3 Patch to fix the LINE UNAVAILABLE error in linux.

open
nobody
None
5
2009-01-25
2009-01-25
i30817
No

This is a work around for screwy jdk behaviour of the AudioSystem.getLine(DataLine.Info) function.

Apparently it can say it supports an audio format and when trying to use it throw a LineUnvailable exception. The root cause is unknown to me, since inside the code it even tries to get a line that allows mixing, so if it should work, unless it is lying.
Anyway a easy workaround for this is opening each returned line and only return one that doesn't throw the exception. This is what this patch does, and it fixed the lineUnavailable error that i saw in my lab linux boxes, while still working in windows.

I didn't change the retry algorithm that JavaStreamingAudioPlayer does. I deleted in my copy of the patch, but since i don't know its purpose i left it there here. Looks useless though - if someone decides to patch this, please find out if this supersedes that, and delete afterward if so.

Discussion

  • i30817

    i30817 - 2009-01-25

    Diff of fix.

     
  • Dirk Schnelle-Walka

    Please send the patch to my email address dirk (dot) schnelle (at) jvoicexml (dot) org since I am not able to download the attached file.