Computers & Internet Logo

Related Topics:

Posted on Jan 12, 2009
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

How can I play a .wav file,.au file in a JDK 1.1.x applet?

Dear Sir,
I have some doubt, please help me in this regard. How can I play a .wav file,.au file in a JDK 1.1.x applet? I need some source code.

waiting for your reply
Abhi

1 Answer

Anonymous

Level 3:

An expert who has achieved level 3 by getting 1000 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Genius:

An expert who has answered 1,000 questions.

  • Master 2,785 Answers
  • Posted on Jan 12, 2009
Anonymous
Master
Level 3:

An expert who has achieved level 3 by getting 1000 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Genius:

An expert who has answered 1,000 questions.

Joined: Apr 01, 2008
Answers
2785
Questions
2
Helped
860334
Points
7964

Plz try with vlc media player

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
4answers

Im trying to convert a QCP file to an MP3 file. I have a conversion program but it seems to be damaging the file, not full play time of the song/file and bad quality. how can I make this work?

Rename the file to .WAV (change the .QCP extension to .WAV) then you can either play the WAV file itself OR convert the WAV file (for free) with CDex.
1helpful
4answers

Java is not working

Hello there :
first you are going to want to ensure that your your current version of java is installed correctly and is not corrupted and if it needs to be reinstalled
download the latest java version and reinstall this . www.java.com
this should be able to take care of the problem that you are having ok?
best regards michael
0helpful
1answer

Fatal error during installation

First u must make sure to close and exit all the applications that are using the resource of JDK.
Method 1: disable the auto load of JDK on machine start up from System Configuration Utility. Then reboot and try to uninstall again from the Add or Remove Programs.
Method 2: reinstall JDK and immediately uninstall it after the installation done. Or maybe u will found the uninstall function during the JDK setup.
Method 3: can try to use the cleaner software like CCleaner to uninstall the JDK application.

YBC (/\)
2helpful
1answer

How to use window.h in c++

Hi,
use windows.h header file and play the .wav file using PlaySound function as  e.g: PlaySound("C:\\SOUNDS\\BELLS.WAV", NULL, SND_ASYNC);

Thanks!
0helpful
1answer

How to play audio clip in java

  • Create an AudioClip object
  • Load .au sound file into AudioClip
  • Play sounds once or loop continuously
  • Stop playback


Here's how the code for these steps looks:
import java.applet.*;
AudioClip ac = getAudioClip(getCodeBase(), soundFile);
ac.play(); //play once
ac.stop(); //stop playing
ac.loop(); //play continuously


It would seem logical to use this same code to play audio clips in a Java application. Unfortunately, if you do that you will get errors from the compiler. Why? Because the AudioClip object and the getAudioClip() method are part of the java.applet package -- and are not part of applications. The good news is we can dive down and make things work ourselves.
The trick to solving this problem is to use some undocumented features that are provided by Sun in its JDK. Taking a peek inside the classes.zip file from the Sun JDK (using any of the various zipfile utilities), we find not only the standard Java packages such as java.applet but also sun.audio. (These are in the directory sun/audio.)
The sun.audio package contains everything we need to be able to play audio clips! Here's the code:
import sun.audio.*; //import the sun.audio package
import java.io.*;
//** add this into your application code as appropriate
// Open an input stream to the audio file.
InputStream in = new FileInputStream(Filename);
// Create an AudioStream object from the input stream.
AudioStream as = new AudioStream(in);
// Use the static class member "player" from class AudioPlayer to play
// clip.
AudioPlayer.player.start(as);
// Similarly, to stop the audio.
AudioPlayer.player.stop(as);


To use a URL as the audio stream source, substitute the following for the input stream and audio stream setup:
AudioStream as = new AudioStream (url.openStream());


Playing the audio stream continuously adds a bit more complexity:
// Create audio stream as discussed previously.
// Create AudioData source.
AudioData data = as.getData();
// Create ContinuousAudioDataStream.
ContinuousAudioDataStream cas = new ContinuousAudioDataStream (data);
// Play audio.
AudioPlayer.player.play (cas);
// Similarly, to stop the audio.
AudioPlayer.player.stop (cas);
1helpful
1answer

Unable to View Java Applet

"load: class JFI.class not found."
Based on the console output, it means that it cannot find the java applet class. In other words, the applet is missing on the server side. There is nothing that you can do about it, unless you know the person who created the applet. Good luck :)
0helpful
1answer

I need source code on how to play ogg, 3gp in visual basic

Hai...
It is a hint note it...
I am not sure about this,
1)Start ur Media player file as wmplayer.exe
OR
2)Set the file path..


process.start("wmplayer.exe")

Regards
Mani
[email protected]
1helpful
3answers

Mp3 to wav tones?

well fist confirm if u phone support .wav format..download mp3 to wav convertor from the internet..but i suggest u to play mp3 files..because in (.wav) format sound quality is not so good
Nov 27, 2008 • Nokia 6600
0helpful
1answer
Not finding what you are looking for?

84 views

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

Brad Brown

Level 3 Expert

19187 Answers

Cindy Wells

Level 3 Expert

6688 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...