Sign in

    Sakuraqwq1/moonflac-encoder/src/encode does not have a README file

    EncodeError

    pub suberror EncodeError {
    Empty
    BadChannels(Int)
    BadBits(Int)
    BadSampleRate(Int)
    NotWholeFrames(Int, Int)
    }

    Why an encode request was rejected.

    encode

    fn encode(samples : Array[Int64], sample_rate : Int, channels : Int, bits_per_sample : Int) -> Bytes raise EncodeError

    Encode interleaved signed PCM as a native FLAC stream.

    samples holds channels interleaved values per frame, each already scaled to bits_per_sample two's complement range. The result is a complete .flac file: fLaC marker, a STREAMINFO block carrying the PCM digest, and fixed blocksize frames with per-frame CRC-8 and CRC-16.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io