I\'m making a java application and I need to play audio. I\'m playing mainly small sound files of my cannon firing (its a cannon shooting game) and the projectiles exploding
For the first method you have to create another thread for audio.
For example like this:
new Thread( new Runnable() { public void run() { try { // PLAY AUDIO CODE } catch (Exception e) { e.printStackTrace(); } } }).start();
Of course you have to make sure that previous sound isn't still playing.