Class ConverterAudioFilter
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.filter.converter.ConverterAudioFilter
-
- All Implemented Interfaces:
AudioFilter,FloatPcmAudioFilter,ShortPcmAudioFilter,SplitShortPcmAudioFilter,UniversalPcmAudioFilter
- Direct Known Subclasses:
ToFloatAudioFilter,ToShortAudioFilter,ToSplitShortAudioFilter
public abstract class ConverterAudioFilter extends java.lang.Object implements UniversalPcmAudioFilter
Base class for converter filters which have no internal state.
-
-
Field Summary
Fields Modifier and Type Field Description protected static intBUFFER_SIZE
-
Constructor Summary
Constructors Constructor Description ConverterAudioFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Free all resources.protected static shortfloatToShort(float value)voidflush()Flush everything to output.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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sedmelluq.discord.lavaplayer.filter.FloatPcmAudioFilter
process
-
Methods inherited from interface com.sedmelluq.discord.lavaplayer.filter.ShortPcmAudioFilter
process, process
-
Methods inherited from interface com.sedmelluq.discord.lavaplayer.filter.SplitShortPcmAudioFilter
process
-
-
-
-
Field Detail
-
BUFFER_SIZE
protected static final int BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
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
-
floatToShort
protected static short floatToShort(float value)
-
-