

Public class SoundPlayerGUI extends JFrame * The sound player can play sound clips in WAV, AU and AIFF formats To start, create an instance of this class. NewClip = (Clip) AudioSystem.getLine(info) Stream = AudioSystem.getAudioInputStream(tmp, stream) ĭataLine.Info info = new DataLine.Info(Clip.class,

we cannot play ALAW/ULAW, so we convert them to PCM * The sound clip if successful, null if the file could not be decoded.ĪudioInputStream stream = AudioSystem.getAudioInputStream(file)

* Load the sound file supplied by the parameter. * Return true if this track has successfully loaded and can be played. * vol Volume level as a percentage (0.100). * Set the playback volume of the current track. Return (int) soundClip.getMicrosecondLength()/1000000 * Return the duration of this track, in seconds. (This method has no effect if the track is not (The sound will play asynchronously, until * Watch out, once a track has been played, it can only be played again * not all WAV files - it depends on the encoding in the file). * The track accepts files in WAV, AIFF, and AU formats (although * and the track object can then be used to control the sound. The track can be instantiated with a valid sound file, * Return this playlist as an array of strings with the track names. ("Error: " + dirName + " must be a directory") * Load the file names of all files in the given directory. * Return the number of tracks in this collection. * Constructor for objects of class TrackCollection * Write a description of class Player here. This is a bluej assignment, not asking for you to do my school assignment, i just need a "push" in the right direction :) So i am not really sure what to do, any help would be appreciated thanks :) So back to my post, trying to figure out what i am doing wrong, and why my class wont compile. Yes i do know this have been posted atleast two times before, but i can hardly get anyhelp out of it.
