mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2026-08-21 18:35:14 -06:00
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:
parent
7a7be2a54b
commit
ec255eea52
5 changed files with 130 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue