aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-06-20 02:10:16 +0200
committerGustav Sörnäs <gustav@sornas.net>2021-06-20 02:11:52 +0200
commitf33a372ef62e337ff141c76f3ec9b6c2a5077630 (patch)
tree55cd7451ea68d2c60cbef2140111e39229096754
parentaabf3a3b458b88eefd8b18ebc5ed9e593d4a694f (diff)
downloadmum-f33a372ef62e337ff141c76f3ec9b6c2a5077630.tar.gz
review
-rw-r--r--mumd/src/audio/sound_effects.rs4
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."),
};