hi..
am quite new to sound applications in java. I want a audio control panel as output. i.e. if i click play button audio should play, if i click stop audio should stop and if i click pause audio should pause/hold until the play or resume button is clicked. i have done with playing and stopping audio. but could not pause and resume the audio . i used audioClip interface to play audio. functions i used were clip.play(), clip.stop(). but clip.pause or clip.resume() does not exist in api.
so can anyone suggest me any other better idea.

Thanx in advance.

You could import the com.samsung.util.AudioClip class into your java class. Then you can reference the java docs from the link below to see how to use it.

http://www.j2megame.org/j2meapi/Samsung_API_1_0/com/samsung/util/AudioClip.html

Keep in mind that you can only use .midi, .mmf, or .mp3 audio with this class. If you prefer making the code custom to your solution then you may want to refer to the link below for another tutorial.

http://docs.oracle.com/javase/tutorial/sound/playing.html

i tried to import the package but i am getting an error that 'cannot find the package'.help please.
Thanx.

Are the class files for the package in a jar file? Is that jar file on the classpath when you compile the program?

Edited 4 Years Ago by NormR1

@NormR1 i havent created a jar file yet.what i simply did is i created a media player which is able to play and stop only so i wanted to do other funtions like pausing media and resuming. the package com.samsung.util was recommended by i am not able to use it in my program because the program cannot find the package.i need help to be able to use the package in my program to perform other funtions.Thank you.

This article has been dead for over six months. Start a new discussion instead.