aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-12-16 15:39:52 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-12-16 15:39:52 -0500
commitc4d78b9453f2f8cf3e136a6960850c5df4dfd40b (patch)
treedc4162e6c22db6a1fde5e9a565ffa0a53f96dd58
parenta2594e99ec7ab946ad7bd0ce86c5720581759d53 (diff)
Fix ReadWav_set
-rw-r--r--wav.bqn2
1 files changed, 1 insertions, 1 deletions
diff --git a/wav.bqn b/wav.bqn
index 7d655ad..1b2e819 100644
--- a/wav.bqn
+++ b/wav.bqn
@@ -172,7 +172,7 @@ ReadWav ← { ¯1⊸⊑⍟(⟨o.freq,o.fmt⟩ ≡ 2⊸↑) GetWav 𝕩 }
WriteWav ← { 𝕩 o.FBytes EncodeWav(⟨o.freq,o.fmt⟩∾<)⍟(1≥≡) 𝕨 }
# Read, setting o.freq and o.fmt as a side effect.
-ReadWav_set ← { t←GetWav 𝕩 ⋄ Set ¯1↓t ⋄ ¯1⊑t }
+ReadWav_set ← { t←GetWav 𝕩 ⋄ o.Set ¯1↓t ⋄ ¯1⊑t }
# Read, resampling to fit current frequency, using options.Resample
ReadWav_coerce ← { ((o.freq∾˜0⊸⊑) o.Resample ¯1⊸⊑) GetWav 𝕩 }