mod: now using getResourceAsStream to load, since this enables us to load from ./ and from classpath
This commit is contained in:
parent
2cc94ffd75
commit
8e992f3257
|
@ -41,7 +41,7 @@ import javax.sound.sampled.*;
|
|||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.FileInputStream;
|
||||
//import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
|
@ -92,7 +92,7 @@ public class WaveData {
|
|||
try {
|
||||
return create(
|
||||
AudioSystem.getAudioInputStream(
|
||||
new BufferedInputStream(new FileInputStream(filepath))));
|
||||
new BufferedInputStream(ClassLoader.getSystemClassLoader().getResourceAsStream(filepath))));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue