Okay guys - here's what i came up with while I was waiting. I thought I had set the Stack Overflow settings to email me when my question was answered, so I thought I received no answers yet. Thus, I continued on by myself.
Here's what I found that worked.
(1) Create the instance by using this:
private PlaySounds lasershot = new PlaySounds("snd/lasershot.wav");
private PlaySounds test = new PlaySounds("snd/cash_register.au");
(2) And create the file PlaySounds.java (or whatever you like)
import java.io.;
import javax.media.;
public class PlaySounds
{
private Player player;
private File file;
// Create a player for each of the sound files
public PlaySounds(String filename)
{
file = new File(filename);
createPlayer();
}
private void createPlayer()
{
if ( file == null )
return;
try
{
// create a new player and add listener
player = Manager.createPlayer( file.toURI().toURL() );
//player.addController( (Controller) new EventHandler(player, null, null, null) );
// player.start(); // start player
}
catch ( Exception e )
{
}
}
public void playSound()
{
// start player
player.start();
// Clear player
player = null;
// Re-create player
createPlayer();
}
} // End of file PlaySounds.java
(3) To use, insert these where you want the sounds:
lasershot.playSound();
test.playSound();
This was the shortest / sweetest I found. Very easy to use, and plays both .au AND .wav files.
I do appreciate all your help guys.