Class BufferingPostProcessor
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.filter.BufferingPostProcessor
-
- All Implemented Interfaces:
AudioPostProcessor
public class BufferingPostProcessor extends java.lang.Object implements AudioPostProcessor
Post processor which encodes audio chunks and passes them as audio frames to the frame buffer.
-
-
Constructor Summary
Constructors Constructor Description BufferingPostProcessor(AudioProcessingContext context, AudioChunkEncoder encoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Frees up all resources this processor is holding internally.voidprocess(long timecode, java.nio.ShortBuffer buffer)Receives chunk buffer in its final PCM format with the sample count, sample rate and channel count matching that of the output format.
-
-
-
Constructor Detail
-
BufferingPostProcessor
public BufferingPostProcessor(AudioProcessingContext context, AudioChunkEncoder encoder)
- Parameters:
context- Processing context to determine the destination buffer from.encoder- Encoder to encode the chunk with.
-
-
Method Detail
-
process
public void process(long timecode, java.nio.ShortBuffer buffer) throws java.lang.InterruptedExceptionDescription copied from interface:AudioPostProcessorReceives chunk buffer in its final PCM format with the sample count, sample rate and channel count matching that of the output format.- Specified by:
processin interfaceAudioPostProcessor- Parameters:
timecode- Absolute starting timecode of the chunk in millisecondsbuffer- PCM buffer of samples in the chunk- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
close
public void close()
Description copied from interface:AudioPostProcessorFrees up all resources this processor is holding internally.- Specified by:
closein interfaceAudioPostProcessor
-
-