Fix sound

This commit is contained in:
catfoolyou
2025-02-14 10:39:17 -05:00
parent f4e3cbe2fe
commit 4aa37b793e
595 changed files with 1847 additions and 5 deletions

View File

@@ -142,7 +142,7 @@ public class JavaLayerUtils
public static Object deserializeArrayResource(String name, Class elemType, int length)
throws IOException
{
InputStream str = getResourceAsStream(name);
InputStream str = JavaLayerUtils.class.getClassLoader().getResourceAsStream(name);
if (str==null)
throw new IOException("unable to load resource '"+name+"'");

View File

@@ -476,7 +476,7 @@ public class SoundManager {
public void playTheTitleMusic() {
if(titleMusic == -1 || !EaglerAdapter.isPlaying(titleMusic)) {
if(this.options.musicVolume > 0.0f) {
titleMusic = EaglerAdapter.beginPlaybackStatic("/sounds/gta.mp3", 1.0f, 1.0f, true);
titleMusic = EaglerAdapter.beginPlaybackStatic("/sounds/menu.mp3", 1.0f, 1.0f, true);
EaglerAdapter.fireTitleMusicEvent(true, this.options.musicVolume);
}
}