diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-06-20 02:10:16 +0200 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-06-20 02:11:52 +0200 |
| commit | f33a372ef62e337ff141c76f3ec9b6c2a5077630 (patch) | |
| tree | 55cd7451ea68d2c60cbef2140111e39229096754 /mumd/src/audio/sound_effects.rs | |
| parent | aabf3a3b458b88eefd8b18ebc5ed9e593d4a694f (diff) | |
| download | mum-f33a372ef62e337ff141c76f3ec9b6c2a5077630.tar.gz | |
review
Diffstat (limited to 'mumd/src/audio/sound_effects.rs')
| -rw-r--r-- | mumd/src/audio/sound_effects.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mumd/src/audio/sound_effects.rs b/mumd/src/audio/sound_effects.rs index 205b3f7..63f08bd 100644 --- a/mumd/src/audio/sound_effects.rs +++ b/mumd/src/audio/sound_effects.rs @@ -70,7 +70,6 @@ impl TryFrom<&str> for NotificationEvents { "deafen" => Ok(NotificationEvents::Deafen), "undeafen" => Ok(NotificationEvents::Undeafen), _ => { - warn!("Unknown notification event '{}' in config", s); Err(()) } } @@ -87,6 +86,7 @@ pub fn load_sound_effects(overrides: &[SoundEffect], num_channels: usize) -> Has if let Ok(event) = NotificationEvents::try_from(event.as_str()) { Some((event, file)) } else { + warn!("Unknown notification event '{}'", event); None } }) @@ -118,7 +118,7 @@ pub fn load_sound_effects(overrides: &[SoundEffect], num_channels: usize) -> Has // LRLRLR (or RLRLRL). Without this, mono audio would be played in // double speed. let iter: Box<dyn Iterator<Item = f32>> = match spec.channels { - 1 => Box::new(samples.into_iter().flat_map(|e| vec![e, e])), + 1 => Box::new(samples.into_iter().flat_map(|e| [e, e])), 2 => Box::new(samples.into_iter()), _ => unimplemented!("Only mono and stereo sound is supported. See #80."), }; |
