From 845f8d528ff13efb7902563bd3e73bb08c8284ca Mon Sep 17 00:00:00 2001 From: Currypan1229 <67533379+Currypan1229@users.noreply.github.com> Date: Wed, 27 Nov 2024 04:06:30 +0900 Subject: [PATCH] Add constructor with ByteByffer to MutableAudioFrame (#158) MutableAudioFrame(ByteBuffer) {} --- .../lavaplayer/track/playback/MutableAudioFrame.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main/src/main/java/com/sedmelluq/discord/lavaplayer/track/playback/MutableAudioFrame.java b/main/src/main/java/com/sedmelluq/discord/lavaplayer/track/playback/MutableAudioFrame.java index 7c325c0c..c68a33e1 100644 --- a/main/src/main/java/com/sedmelluq/discord/lavaplayer/track/playback/MutableAudioFrame.java +++ b/main/src/main/java/com/sedmelluq/discord/lavaplayer/track/playback/MutableAudioFrame.java @@ -10,6 +10,18 @@ public class MutableAudioFrame extends AbstractMutableAudioFrame { private int framePosition; private int frameLength; + public MutableAudioFrame() { + } + + /** + * This should be called only by the requester of a frame. + * + * @param frameBuffer Buffer to use internally. + */ + public MutableAudioFrame(final ByteBuffer frameBuffer) { + this.setBuffer(frameBuffer); + } + /** * This should be called only by the requester of a frame. *