Class FilterChainBuilder


  • public class FilterChainBuilder
    extends java.lang.Object
    Builder for audio filter chains.
    • Constructor Detail

      • FilterChainBuilder

        public FilterChainBuilder()
    • 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 - See AudioFilterChain.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.