psg 1.0.1

Fast and precise AY-3-8910 and YM2149 sound chip emulation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fmt::{Display, Formatter, Result};

/// An enum representing all possible errors that the PSG may encounter during operation.
#[derive(Debug)]
pub enum Error {
    /// The clock rate is too high for the requested sample rate.
    ClockRateTooHigh
}

impl Display for Error {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
        match self {
            Error::ClockRateTooHigh => f.write_str("the clock rate is too high for the requested sample rate")
        }
    }
}

impl std::error::Error for Error {}