Skip to content

Commit

Permalink
fix: disable audio capture in replay
Browse files Browse the repository at this point in the history
  • Loading branch information
Apehum committed Oct 4, 2024
1 parent 0ee6805 commit b9d1a54
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import su.plo.voice.api.addon.annotation.Addon;
import su.plo.voice.api.client.PlasmoVoiceClient;
import su.plo.voice.api.client.audio.source.ClientAudioSource;
import su.plo.voice.api.client.event.audio.capture.AudioCaptureEvent;
import su.plo.voice.api.client.event.audio.capture.AudioCaptureInitializeEvent;
import su.plo.voice.api.client.event.audio.device.source.AlSourceWriteEvent;
import su.plo.voice.api.client.event.audio.source.AudioSourceResetEvent;
Expand Down Expand Up @@ -122,6 +123,12 @@ public void onDistanceRender(@NotNull VoiceDistanceRenderEvent event) {
}
}

@EventSubscribe
public void onAudioCapture(@NotNull AudioCaptureEvent event) {
if (!ReplayInterface.INSTANCE.isInReplayEditor) return;
event.setCancelled(true);
}

@EventSubscribe
public void onHudActivationRender(@NotNull HudActivationRenderEvent event) {
if (!ReplayInterface.INSTANCE.isInReplayEditor || event.isRender()) return;
Expand Down

0 comments on commit b9d1a54

Please sign in to comment.