sim-lib-sound-render 0.1.0-rc.1

SIM workspace package for sim lib sound render.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

/// Error raised by sound rendering and WAV encoding.
#[derive(Debug, Error, Clone, PartialEq, Eq)]
pub enum SoundRenderError {
    /// The sample rate was zero.
    #[error("sample rate must be positive")]
    InvalidSampleRate,
    /// The channel count was neither mono (1) nor stereo (2).
    #[error("renderer only supports mono or stereo output")]
    InvalidChannelCount,
    /// The audio buffer exceeded the size encodable in a WAV header.
    #[error("audio buffer too large to encode")]
    BufferTooLarge,
}