Class FilterChainBuilder
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.filter.FilterChainBuilder
-
public class FilterChainBuilder extends java.lang.ObjectBuilder for audio filter chains.
-
-
Constructor Summary
Constructors Constructor Description FilterChainBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFirst(AudioFilter filter)AudioFilterChainbuild(java.lang.Object context, int channelCount)AudioFilterfirst()FloatPcmAudioFiltermakeFirstFloat(int channelCount)UniversalPcmAudioFiltermakeFirstUniversal(int channelCount)
-
-
-
Method Detail
-
addFirst
public void addFirst(AudioFilter filter)
- Parameters:
filter- The filter to add as the first one in the chain.
-
first
public AudioFilter first()
- Returns:
- The first chain in the filter.
-
makeFirstFloat
public FloatPcmAudioFilter makeFirstFloat(int channelCount)
- Parameters:
channelCount- Number of input channels expected by the current head of the chain.- Returns:
- The first chain in the filter as a float PCM filter, or if it is not, then adds an adapter filter to the beginning and returns that.
-
makeFirstUniversal
public UniversalPcmAudioFilter makeFirstUniversal(int channelCount)
- Parameters:
channelCount- Number of input channels expected by the current head of the chain.- Returns:
- The first chain in the filter as an universal PCM filter, or if it is not, then adds an adapter filter to the beginning and returns that.
-
build
public AudioFilterChain build(java.lang.Object context, int channelCount)
- Parameters:
context- SeeAudioFilterChain.context.channelCount- Number of input channels expected by the current head of the chain.- Returns:
- The built filter chain. Adds an adapter to the beginning of the chain if the first filter is not universal.
-
-