Class BufferingPostProcessor

  • All Implemented Interfaces:
    AudioPostProcessor

    public class BufferingPostProcessor
    extends java.lang.Object
    implements AudioPostProcessor
    Post processor which encodes audio chunks and passes them as audio frames to the frame buffer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Frees up all resources this processor is holding internally.
      void process​(long timecode, java.nio.ShortBuffer buffer)
      Receives chunk buffer in its final PCM format with the sample count, sample rate and channel count matching that of the output format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BufferingPostProcessor

        public BufferingPostProcessor​(AudioProcessingContext context,
                                      AudioChunkEncoder encoder)
        Parameters:
        context - Processing context to determine the destination buffer from.
        encoder - Encoder to encode the chunk with.
    • Method Detail

      • process

        public void process​(long timecode,
                            java.nio.ShortBuffer buffer)
                     throws java.lang.InterruptedException
        Description copied from interface: AudioPostProcessor
        Receives chunk buffer in its final PCM format with the sample count, sample rate and channel count matching that of the output format.
        Specified by:
        process in interface AudioPostProcessor
        Parameters:
        timecode - Absolute starting timecode of the chunk in milliseconds
        buffer - PCM buffer of samples in the chunk
        Throws:
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).