diff options
| author | Rubens Brandao <git@rubens.io> | 2021-04-07 14:29:23 +0200 |
|---|---|---|
| committer | Rubens Brandao <git@rubens.io> | 2021-04-07 14:29:23 +0200 |
| commit | 12554b2f6cd89ad3cd3721bbc790d7772a21c3ae (patch) | |
| tree | 03a289b3610eb5000ee3347c9a73d75da336808b /mumd/src/error.rs | |
| parent | 38270c4a2374c2ccc04597a28fb191af9d86b814 (diff) | |
| download | mum-12554b2f6cd89ad3cd3721bbc790d7772a21c3ae.tar.gz | |
Create a trait and default implementation for device audio input
Diffstat (limited to 'mumd/src/error.rs')
| -rw-r--r-- | mumd/src/error.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mumd/src/error.rs b/mumd/src/error.rs index f7818a1..2887dd0 100644 --- a/mumd/src/error.rs +++ b/mumd/src/error.rs @@ -86,6 +86,8 @@ pub enum AudioError { NoSupportedConfig(AudioStream), InvalidStream(AudioStream, cpal::BuildStreamError), OutputPlayError(cpal::PlayStreamError), + InputPlayError(cpal::PlayStreamError), + InputPauseError(cpal::PauseStreamError), } impl fmt::Display for AudioError { @@ -96,6 +98,8 @@ impl fmt::Display for AudioError { AudioError::NoSupportedConfig(s) => write!(f, "No supported {} config found", s), AudioError::InvalidStream(s, e) => write!(f, "Invalid {} stream: {}", s, e), AudioError::OutputPlayError(e) => write!(f, "Playback error: {}", e), + AudioError::InputPlayError(e) => write!(f, "Recording error: {}", e), + AudioError::InputPauseError(e) => write!(f, "Recording error: {}", e), } } } |
