law-encoder 0.1.0

A library for encoding 16bit PCM to a-law and mu-law.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use core::fmt;

#[derive(Debug)]
pub enum EncodeError {
    OutputBufferTooSmall,
}

impl fmt::Display for EncodeError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            EncodeError::OutputBufferTooSmall => write!(
                f,
                "Output buffer is too small. Must be at least 1/2 of input size."
            ),
        }
    }
}