|
Why doesn't this Java applet play my sound file? |
Views: 3232
|
Thread Tools | Rate Thread |
#1
|
|||
|
|||
Why doesn't this Java applet play my sound file?
So that cool sound file you found doesn't work with your Java applet? It may have to do with the particular format of the sound file you're trying to use.
By default, Java applets are able to play audio (.au) files, a digital audio file format developed by Sun Microsystems. In order to be compatible with Java enabled browsers, audio files used with Java applets should be sampled at 8000 Hz, 8-bit, mono, u-law. Wondering what to do if you have a sound file in another format such as wave (.wav) or even an .au file sampled at a different rate that you want to use with your Java applet? You could convert your file into the particular .au format supported by Java applets.
Listing #1 : Digital audio editors able to create Java compatible .au files |