Class ResamplingPcmAudioFilter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Free all resources.
      void flush()
      Flush everything to output.
      void process​(float[][] input, int offset, int length)  
      void seekPerformed​(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
    • Constructor Detail

      • ResamplingPcmAudioFilter

        public ResamplingPcmAudioFilter​(AudioConfiguration configuration,
                                        int channels,
                                        FloatPcmAudioFilter downstream,
                                        int sourceRate,
                                        int targetRate)
        Parameters:
        configuration - Configuration to use
        channels - Number of channels in input data
        downstream - Next filter in chain
        sourceRate - Source sample rate
        targetRate - Target sample rate
    • Method Detail

      • seekPerformed

        public void seekPerformed​(long requestedTime,
                                  long providedTime)
        Description copied from interface: AudioFilter
        Indicates that the next samples are not a continuation from the previous ones and gives the timecode for the next incoming sample.
        Specified by:
        seekPerformed in interface AudioFilter
        Parameters:
        requestedTime - Timecode in milliseconds to which the seek was requested to
        providedTime - Timecode in milliseconds to which the seek was actually performed to
      • flush

        public void flush()
                   throws java.lang.InterruptedException
        Description copied from interface: AudioFilter
        Flush everything to output.
        Specified by:
        flush in interface AudioFilter
        Throws:
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).
      • close

        public void close()
        Description copied from interface: AudioFilter
        Free all resources. No more input is expected.
        Specified by:
        close in interface AudioFilter
      • process

        public void process​(float[][] input,
                            int offset,
                            int length)
                     throws java.lang.InterruptedException
        Specified by:
        process in interface FloatPcmAudioFilter
        Parameters:
        input - An array of samples for each channel
        offset - Offset in the arrays to start at
        length - Length of the target sequence in arrays
        Throws:
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).