// Copyright 2014-2025 Jesper Larsson
//
// This file is part of Klipspringer, <https://klipspringer.avadeaux.net/>
//
// Klipspringer is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// Klipspringer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
// even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with Klipspringer. If
// not, see <https://www.gnu.org/licenses/>.

package net.avadeaux.klipspringer.codec;

import java.nio.ByteBuffer;
import java.io.Closeable;
import java.io.IOException;

/** Audio writing interface. */
public interface PcmWriter extends Closeable {
    /** Writes a block of audio data. Returning true is a signal to the caller to continue sending
      * more blocks until the input is exhausted. Returning false is a signal that decoding should
      * stop. In the context of a {@link AudioDecoder#reusable() reusable} encoder, blocks may again
      * start to arrive with the next call to {@link AudioDecoder#decodeAll(long) decodeAll}.
      */
    boolean write(ByteBuffer data) throws IOException;

    /** See {@link Closeable#close()}. */
    void close() throws IOException;
}

Version: v4.3.2.2 (2026-05-16T17:03:34+02:00)
Raw file
Source code overview
Klipspringer home