Play .AU file problem

Posted on 1999-07-21
Medium Priority
Last Modified: 2006-11-17
Hi Gurus,

I have a problem when playing a particular au file. The problem looks like this: I have a wav file to be used in my applet, and so I used a software tool(GoldWave) to convert it into .au format. However, after this, when I play it in mouseDown(...) event handler, the sound clip sounds off just occassionally, that is, sometimes it sounds off, sometimes it does not. While most of other files I played using same method does not have this problem. Do you know what might cause this happen?

The way I play all my .au files is quite common, that is:

AudioClip mysound;
mysound = getAudioClip(getCodeBase(),"mysound.au");

I can't find any problem with my coding, and then I suspect this particular file(which is only 327 bites after converted to .au)is so a compatible .au format with JDK1.1, could this be the cause? If so, do you know any program which can convert normal wav file to .au file that can be played within java applet, no matter the size of the file?

Thanks for any input,
Question by:lll888
  • 2

Expert Comment

ID: 1246711
According to the Java Tutorial (java.sun.com): JDK 1.1.x supports only one sound format: 8 bit, µlaw, 8000 Hz, one-channel, Sun ".au" files

When you converted your .wav file to .au, make sure you follow these specifications.

Author Comment

ID: 1246712
Thanks, I finally fixed this.
How can I credit points to you?(I am a bit new here)


Accepted Solution

Yoia earned 600 total points
ID: 1246713
I'll just lock this question by giving an 'answer' and you can award the points then by accepting the answer.
Thanks! :)

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
A discussion about automated testing of Web Applications utilizing Selenium, along with illustrated configuration steps for the Jenkins open source tool.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

619 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question