Class TeeAudioProcessor

  • All Implemented Interfaces:
    AudioProcessor

    public final class TeeAudioProcessor
    extends BaseAudioProcessor
    Audio processor that outputs its input unmodified and also outputs its input to a given sink. This is intended to be used for diagnostics and debugging.

    This audio processor can be inserted into the audio processor chain to access audio data before/after particular processing steps have been applied. For example, to get audio output after playback speed adjustment and silence skipping have been applied it is necessary to pass a custom AudioProcessorChain when creating the audio sink, and include this audio processor after all other audio processors.

    • Method Detail

      • queueInput

        public void queueInput​(ByteBuffer inputBuffer)
        Description copied from interface: AudioProcessor
        Queues audio data between the position and limit of the inputBuffer for processing. After calling this method, processed output may be available via AudioProcessor.getOutput(). Calling queueInput(ByteBuffer) again invalidates any pending output.
        Parameters:
        inputBuffer - The input buffer to process. It must be a direct byte buffer with native byte order. Its contents are treated as read-only. Its position will be advanced by the number of bytes consumed (which may be zero). The caller retains ownership of the provided buffer.