PRB: Unable to Play .wav file from Applet or AudioClip

ID: Q178707


The information in this article applies to:
  • Microsoft Visual J++, versions 1.0, 1.1
  • Microsoft SDK for Java, versions 1.51, 2.0, 2.01, 2.02, 3.0, 3.1, 3.2


SYMPTOMS

When an Applet tries to play a .wav file from an applet using the Applet.play() method or the AudioClip.play() method, either nothing happens or you get the following console output:


NativeAudioStream: invalid file type 


CAUSE

The Sun Microsystems Inc. Java Development Kit (JDK) 1.02 and 1.1 APIs are able to play only AU files. The AU files need to be 8 bit, ulaw, 8000 Hz, and one channel.


RESOLUTION

Use a product that is capable of creating AU files according to these specifications. Convert the .wav file and change the URL to point to the AU file.


STATUS

This behavior is by design.


REFERENCES

For additional information, please see the following article in the Microsoft Knowledge Base:

Q179850 HOWTO: Playing a .wav file in Java
For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/

http://support.microsoft.com/support/java/

Additional query words:

Keywords : kb3rdparty kbnokeyword kbSDKJava300 kbVJ kbSDKJava310 kbSDKJava320
Version : WINDOWS:1.0,1.1,1.51,2.0,2.01,2.02,3.0,3.1.3.2
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: November 16, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.