Add API methods for controlling audio

Hook up Update() callback
Add Audio QOL plugin with mute/unmute hotkey and better settings persistence
This commit is contained in:
Ceikry 2022-09-26 21:05:02 -05:00
parent 7a7be2a54b
commit ec255eea52
5 changed files with 130 additions and 4 deletions

View file

@ -128,9 +128,13 @@ public class SoundPlayer {
}
MidiPlayer.jingle = false;
} else if (Preferences.musicVolume != 0 && MusicPlayer.groupId != -1 && !MidiPlayer.isPlaying()) {
Protocol.outboundBuffer.p1isaac(137);
Protocol.outboundBuffer.p4(MusicPlayer.groupId);
MusicPlayer.groupId = -1;
sendTrackEndPacket();
}
}
public static void sendTrackEndPacket() {
Protocol.outboundBuffer.p1isaac(137);
Protocol.outboundBuffer.p4(MusicPlayer.groupId);
MusicPlayer.groupId = -1;
}
}

View file

@ -1589,6 +1589,7 @@ public final class client extends GameShell {
@Pc(24) GregorianCalendar gregorianCalendar = new GregorianCalendar();
MiniMenu.gregorianDateSeed = gregorianCalendar.get(Calendar.HOUR_OF_DAY) * 600 + gregorianCalendar.get(Calendar.MINUTE) * 10 + gregorianCalendar.get(Calendar.SECOND) / 6;
aRandom1.setSeed(MiniMenu.gregorianDateSeed);
PluginRepository.Update();
}
this.js5NetworkLoop();
if (js5MasterIndex != null) {