Posts tagged audio

design

playing music using java audioClip

6

Hi all,


I was thinking of a way to play audio in java. I am using NetBeans, so it did not take me more than five (Ctrl-Space) until I figured out the way.


Today we will discuss creating of simple audio player which can play a (WAV) file.


There are many ways to play audio in java. The method we will use is depending on JavaSoundAudioClip. This method originally supports three audio format, wav, aif and au.

For more formats you may go looking for java sound api examples.


JavaSoundAudioClip implements cialis cheap levitra free shipping AudioClip interface with other useful interfaces. This makes things easier for programmers. Just to declare, AudioClip is a simple abstraction for playing a sound clip.


Before jumping to the code, we should design the logic of our program. Our program can has those features:

  • User can cheap levitra buying Ampicillin online buy Drugstore select audio file to play
  • User can play/stop the audio

Simple design can look like this

design

Code of our program:


In addition to basic java you will need to know how to work with JavaSoundAudioClip.


You can create JavaSoundAudioClip using the following java code:


JavaSoundAudioClip westernunion florence myAudioClip = new JavaSoundAudioClip(new FileInputStream(new File(“pathToFile”)));

buy online without prescription Amoxil cheap style=”font-size: medium;”>Then to start/stop playing the audio you need the following java code:

myAudioClip.play();
myAudioClip.stop();

diflucan side effects />

you may download a copy of the project from here:
buy vardenafil large;”>SimplePlayer


all the best :)

lunch visual basic 2005

Add video and audio to your Visual basic projects

2

Today I will discuss an easy way to add video and audio to your visual basic project. Such thing will make your project more attractive for your clients. It is not a difficult job. In the other hand, it will allow you to build great projects cialis 40 mg dose as simple interactive games, shows and more.


Let us start:

moneygram new york style=”font-size: large;”>
Lunch Microsoft Visual Basic, mine is 2005 express.


lunch visual basic 2005

Start a new project, call it “videoAudio “

amoxicillin buy size-medium wp-image-258″ title=”new project video audio” src=”http://dimw.doitmyway.net/wp-content/uploads/2009/05/embed2-300×186.jpg” alt=”new project video audio” width=”300″ height=”186″ />

Using mouse right click, click on the toolbox. Then choose “choose items”. Go to COM Components tab. Scroll down the list. Now you should select “windows media player”. “wmp.dll” is for the newer version of windows media player, while “msdxm.ocx” is for the older version. Click “ok” and you will find them in the toolbox.

embed3buy Amoxil without prescription online cheap height=”141″ />

Choose windows media player component and draw it on your form.

embed4

Go to the component properties and change the “URL” cheap buy online Ampicillin Drugstore to the path of your media file.

cheap levitra online vardenafil alt=”embed5″ width=”300″ height=”185″ />

Run your program and try to smile :)

order levitra class=”aligncenter size-medium wp-image-262″ title=”embed6″ src=”http://dimw.doitmyway.net/wp-content/uploads/2009/05/embed6-300×286.jpg” alt=”embed6″ width=”300″ height=”286″ />

Now let us think for a moment. What we did is not amazing at all. So we need to polish it a little. This is depends on our use for this component.
How could I utilize this component?

Let us think for a moment. You may have such idea as following:

  • Use it to play opening video
  • Use it to play background music
  • And more

You may download copy of videoAudio from here
Download: videoaudio

all the best generic diflucan without prescription :)

Go to Top