LineUnavailableException when trying to play .wav file



I'm trying to play a simple .wav file using code copied from:

http://www.developer.com/java/other/article.php/2173111

I'm running the latest Java 1.6 on windows 98 SE. However I get:

PCM_SIGNED 22050.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian
javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 22050.
0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.
at com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(Unknown Source)
at com.sun.media.sound.AbstractDataLine.open(Unknown Source)
at com.sun.media.sound.AbstractDataLine.open(Unknown Source)
at AudioPlayer02$PlayThread.run(AudioPlayer02.java:146)

This happens whenever I try to open the line. I get the same problem when I run jsinfo.jar (from http://www.jsresources.org/apps/jsinfo.html) - everything is fine until I try to open a line.

WinAmp plays the .wav file without any problems.

I can even play it using the DirectSound code in:
http://msdn.microsoft.com/archive/en-us/dnarsound/html/msdn_streams3.asp?frame=true

Is this just a problem with windows 98 or is there something I'm over looking?
.



Relevant Pages

  • Re: playing a .wav file...
    ... >>> windows media player opening up? ... Just want to play the .wav file ... >>> with no windows opening up or if possible not even minimized. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: playing a .wav file...
    ... >> windows media player opening up? ... Just want to play the .wav file ... >> with no windows opening up or if possible not even minimized. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Sound In Outlook Express
    ... protected Windows files are intact and in their original versions. ... "Steve Cochran" wrote: ... >> Wav files play fine. ... >> wav file and send the e-mail and it plays. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: WMP9 Wont Play .wav, .mid, or .mpg Audio Portion
    ... >Windows Media Player cannot play the file. ... Download Center, I saw that there was a new version of DirectX, 9.0c so I ... I opened GSpot again and reopened the same .wav file, ...
    (microsoft.public.windowsmedia.player)
  • Re: Make a .WAV file come out of the left speaker in Windows
    ... > I am writing a Python script that uses the win32all winsound package to ... > play a .wav file. ... I eventually got out ctypes and used it to access the Windows ...
    (comp.lang.python)