Attempts to load music with incorrect file names. #33
This commit is contained in:
parent
8c24ef97c7
commit
64755bbc5c
|
@ -149,6 +149,14 @@ public class OpenALStreamPlayer {
|
|||
audio = new Mp3InputStream(ResourceLoader.getResourceAsStream(ref));
|
||||
else
|
||||
audio = new OggInputStream(ResourceLoader.getResourceAsStream(ref));
|
||||
|
||||
if(audio.getRate() == 0 && audio.getChannels() == 0) {
|
||||
if (ref.toLowerCase().endsWith(".mp3"))
|
||||
audio = new OggInputStream(ResourceLoader.getResourceAsStream(ref));
|
||||
else
|
||||
audio = new Mp3InputStream(ResourceLoader.getResourceAsStream(ref));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.audio = audio;
|
||||
|
|
Loading…
Reference in New Issue
Block a user