Class CapturingAudioSink

    • Constructor Detail

      • CapturingAudioSink

        public CapturingAudioSink​(AudioSink sink)
    • Method Detail

      • configure

        public void configure​(Format inputFormat,
                              int specifiedBufferSize,
                              @Nullable
                              int[] outputChannels)
                       throws AudioSink.ConfigurationException
        Description copied from interface: AudioSink
        Configures (or reconfigures) the sink.
        Specified by:
        configure in interface AudioSink
        Overrides:
        configure in class ForwardingAudioSink
        Parameters:
        inputFormat - The format of audio data provided in the input buffers.
        specifiedBufferSize - A specific size for the playback buffer in bytes, or 0 to infer a suitable buffer size.
        outputChannels - A mapping from input to output channels that is applied to this sink's input as a preprocessing step, if handling PCM input. Specify null to leave the input unchanged. Otherwise, the element at index i specifies index of the input channel to map to output channel i when preprocessing input buffers. After the map is applied the audio data will have outputChannels.length channels.
        Throws:
        AudioSink.ConfigurationException - If an error occurs configuring the sink.
      • flush

        public void flush()
        Description copied from interface: AudioSink
        Flushes the sink, after which it is ready to receive buffers from a new playback position.

        The audio session may remain active until AudioSink.reset() is called.

        Specified by:
        flush in interface AudioSink
        Overrides:
        flush in class ForwardingAudioSink
      • dump

        public void dump​(Dumper dumper)
        Description copied from interface: Dumper.Dumpable
        Dumps the fields of the object using the dumper.
        Specified by:
        dump in interface Dumper.Dumpable
        Parameters:
        dumper - The Dumper to be used to dump fields.