Class FinalPcmAudioFilter
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.filter.FinalPcmAudioFilter
-
- All Implemented Interfaces:
AudioFilter,FloatPcmAudioFilter,ShortPcmAudioFilter,SplitShortPcmAudioFilter,UniversalPcmAudioFilter
public class FinalPcmAudioFilter extends java.lang.Object implements UniversalPcmAudioFilter
Collects buffers of the required chunk size and passes them on to audio post processors.
-
-
Constructor Summary
Constructors Constructor Description FinalPcmAudioFilter(AudioProcessingContext context, java.util.Collection<AudioPostProcessor> postProcessors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Free all resources.voidflush()Flush everything to output.voidprocess(float[][] buffer, int offset, int length)voidprocess(short[][] input, int offset, int length)voidprocess(short[] input, int offset, int length)voidprocess(java.nio.ShortBuffer buffer)voidseekPerformed(long requestedTime, long providedTime)Indicates that the next samples are not a continuation from the previous ones and gives the timecode for the next incoming sample.
-
-
-
Constructor Detail
-
FinalPcmAudioFilter
public FinalPcmAudioFilter(AudioProcessingContext context, java.util.Collection<AudioPostProcessor> postProcessors)
- Parameters:
context- Configuration and output information for processingpostProcessors- Post processors to pass the final audio buffers to
-
-
Method Detail
-
seekPerformed
public void seekPerformed(long requestedTime, long providedTime)Description copied from interface:AudioFilterIndicates that the next samples are not a continuation from the previous ones and gives the timecode for the next incoming sample.- Specified by:
seekPerformedin interfaceAudioFilter- Parameters:
requestedTime- Timecode in milliseconds to which the seek was requested toprovidedTime- Timecode in milliseconds to which the seek was actually performed to
-
flush
public void flush() throws java.lang.InterruptedExceptionDescription copied from interface:AudioFilterFlush everything to output.- Specified by:
flushin interfaceAudioFilter- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
close
public void close()
Description copied from interface:AudioFilterFree all resources. No more input is expected.- Specified by:
closein interfaceAudioFilter
-
process
public void process(short[] input, int offset, int length) throws java.lang.InterruptedException- Specified by:
processin interfaceShortPcmAudioFilter- Parameters:
input- Array of samplesoffset- Offset in the arraylength- Length of the sequence in the array- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
process
public void process(short[][] input, int offset, int length) throws java.lang.InterruptedException- Specified by:
processin interfaceSplitShortPcmAudioFilter- Parameters:
input- An array of samples for each channeloffset- Offset in the arraylength- Length of the sequence in the array- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
process
public void process(java.nio.ShortBuffer buffer) throws java.lang.InterruptedException- Specified by:
processin interfaceShortPcmAudioFilter- Parameters:
buffer- The buffer of samples- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
process
public void process(float[][] buffer, int offset, int length) throws java.lang.InterruptedException- Specified by:
processin interfaceFloatPcmAudioFilter- Parameters:
buffer- An array of samples for each channeloffset- Offset in the arrays to start atlength- Length of the target sequence in arrays- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
-