Spread the love

Multimedia Audio in Java Concept Simplified

Spread the love

MultiMedia in Java
MultiMedia in Java

Multimedia in Java:

Multimedia is the processing of audio,video,images(graphics,texts in such a way that one can create them,interact with them in the real time manner). Since java has portability one of the core features , it can work with multimedia very smoothly.


Java can play audio over wide range of platforms if passes from URL in .au format.To reuse .wav or .aiff files, we need to convert them in .au format.Without conversion,if try to play an audio file we will get InvalidAudioFormatException.The .au file is 8 bit,8KHZ encoded audio file.The format does not represent the state of art in audio fidelity but suffice for most sound clips. By the play() method we can play an audio file.

public void play(URL url);
public void play(URL url,String name);

public void play(URL url), This method plays an audio clip if the audio clip represented by URL is found.
public void play(URL url,String name) plays an audio clip referred by the URL has many clips and matches with the name specified in the argument.

Once the URL refers the clip and by name it is found,java then loads the file into the memory then play once.

Disadvantages of Audio: 

  1. The first ti,e we call it with a given audio file,it will have to be download the file. Now this is the happy path . For a case where the path is broken due to any factors(the link is not valid,the audio file is not present),User ends up waiting for loading the file and play.
  2. If it present in an applet package and if we need to use it from other component or form within a thread,we need to have a reference to Applet class.It is not very efficient.
  3. Play() method sounds only once and must be called again and again to play the same sound multiple times.
READ  Learn String Class in Java Quick in 20 Minutes
READ  Array Class in Java

Spread the love
Animesh Chatterjeehttps://techtravelhub.com/
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

Related Articles

Learn How to Use Jacoco Java code Coverage

Introduction to Jacoco Jacoco provides a wide range of coverage(analysis of instructions,...



Please enter your comment!
Please enter your name here

Recent Posts

Learn Quickly About DevOps Tools in a Fast and Efficient Manner

Introduction to DevOps tools DevOps tools are a collection of...

How to Collaborate between Development and Operations Team Fast and Effectively

Collaborate between Development and Operations Teams are the key...

Learn How to Use Jacoco Java code Coverage

Introduction to Jacoco Jacoco provides a wide range of coverage(analysis...


Spread the love