aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/audio.rs
diff options
context:
space:
mode:
authorEskil Q <eskilq@kth.se>2020-12-25 22:01:01 +0100
committerEskil Q <eskilq@kth.se>2020-12-25 22:01:01 +0100
commit68e5f1d39e6a1e7216ffb3574ca48627f8fca294 (patch)
tree25c57296a42c5f789f2f288057d4252a1081c04a /mumd/src/audio.rs
parentb9ac36af4059a9c48288c6e9c252b2cbacd4c0d5 (diff)
downloadmum-68e5f1d39e6a1e7216ffb3574ca48627f8fca294.tar.gz
add comment
Diffstat (limited to 'mumd/src/audio.rs')
-rw-r--r--mumd/src/audio.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/mumd/src/audio.rs b/mumd/src/audio.rs
index b578256..8f9e2ab 100644
--- a/mumd/src/audio.rs
+++ b/mumd/src/audio.rs
@@ -241,6 +241,7 @@ impl Audio {
let samples = signal
.from_hz_to_hz(interp, spec.sample_rate as f64, SAMPLE_RATE as f64)
.until_exhausted()
+ // if the source audio is stereo and is being played as mono, discard the right audio
.flat_map(|e| if output_config.channels == 1 { vec![e[0]] } else { e.to_vec() })
.collect::<Vec<f32>>();
(*event, samples)