Skip to content

Commit f40ad21

Browse files
committed
more debug info
1 parent 7f02d69 commit f40ad21

4 files changed

Lines changed: 6 additions & 1 deletion

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mod_name=Channel
3030
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3131
mod_license=GNU GPL 3.0
3232
# The mod version. See https://semver.org/
33-
mod_version=26.1.2-31+beta
33+
mod_version=26.1.2-32+beta
3434
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3535
# This should match the base package used for the mod sources.
3636
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

src/main/java/cn/ussshenzhou/channel/audio/DebugManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
public class DebugManager {
2626
public static final int MEASURE_WINDOW_MS = 2000;
2727
public static final int LONG_MEASURE_WINDOW_MS = 5000;
28+
public static final IntervalCounter MIC_READ_COUNTER = new IntervalCounter(ChannelClientConfig.get().frameLengthMs, MEASURE_WINDOW_MS);
2829
public static final IntervalCounter MIC_SEND_COUNTER = new IntervalCounter(ChannelClientConfig.get().frameLengthMs, MEASURE_WINDOW_MS);
2930
public static final IntervalCounter PLAY_COUNTER = new IntervalCounter(10, MEASURE_WINDOW_MS);
3031
public static final HashMap<UUID, IntervalCounter> RECEIVE_COUNTER = new HashMap<>();
@@ -45,6 +46,7 @@ public class DebugManager {
4546
}
4647

4748
public static void refresh() {
49+
MIC_READ_COUNTER.setIdealIntervalMs(ChannelClientConfig.get().frameLengthMs);
4850
MIC_SEND_COUNTER.setIdealIntervalMs(ChannelClientConfig.get().frameLengthMs);
4951
PLAY_COUNTER.reset();
5052
RECEIVE_COUNTER.clear();

src/main/java/cn/ussshenzhou/channel/audio/client/send/MicReader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public static synchronized void frameLengthChange() {
4747
}
4848

4949
private static synchronized void read() {
50+
DebugManager.MIC_READ_COUNTER.update();
5051
if (Minecraft.getInstance().getConnection() == null ||
5152
!CompatHelper.isClientLevelValid() ||
5253
MicrophoneHud.getStatus() == MicrophoneHud.Status.SUBSPACE ||

src/main/java/cn/ussshenzhou/channel/gui/hud/DebugHud.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public void tickT() {
4646
4747
Open Space Correction: %.3f
4848
49+
Reading Interval: %s
4950
Sending Interval: %s
5051
ICMP Ping: %s
5152
Playing Interval: %s
@@ -68,6 +69,7 @@ public void tickT() {
6869

6970
getOpenSpaceCorrection(),
7071

72+
DebugManager.MIC_READ_COUNTER.toString(),
7173
DebugManager.MIC_SEND_COUNTER.toString(),
7274
DebugManager.ICMP_PING.getStringAsMs(),
7375
DebugManager.PLAY_COUNTER.toString(),

0 commit comments

Comments
 (0)