aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/soundchan/AudioPlayerSendHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/soundchan/AudioPlayerSendHandler.java')
-rw-r--r--src/main/java/soundchan/AudioPlayerSendHandler.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main/java/soundchan/AudioPlayerSendHandler.java b/src/main/java/soundchan/AudioPlayerSendHandler.java
index fdd9774..43b1c75 100644
--- a/src/main/java/soundchan/AudioPlayerSendHandler.java
+++ b/src/main/java/soundchan/AudioPlayerSendHandler.java
@@ -24,19 +24,12 @@ public class AudioPlayerSendHandler implements AudioSendHandler {
@Override
public boolean canProvide() {
- if (lastFrame == null) {
- lastFrame = audioPlayer.provide();
- }
-
+ lastFrame = audioPlayer.provide();
return lastFrame != null;
}
@Override
public ByteBuffer provide20MsAudio() {
- if (lastFrame == null) {
- lastFrame = audioPlayer.provide();
- }
-
return ByteBuffer.wrap(lastFrame.getData());
}