mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
Added an isLoaded check to AudioAsset getNewClip().
This commit is contained in:
@@ -11,6 +11,9 @@ public class AudioAsset extends BaseResource implements LoadableResource {
|
||||
|
||||
// Gets a new clip to play
|
||||
public Clip getNewClip() throws LineUnavailableException, UnsupportedAudioFileException, IOException {
|
||||
if(!this.isLoaded()){
|
||||
this.load();
|
||||
}
|
||||
|
||||
// Get a new clip from audio system
|
||||
Clip clip = AudioSystem.getClip();
|
||||
|
||||
Reference in New Issue
Block a user