Checkpoint

This commit is contained in:
maze authored and maze committed 2026-10-29 17:28:51 +01:00
1 parent 7b6db17870
commit 0295eb1ad2
125 files changed
+59376

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
package audio
// InterleavedStereoToMono converts interleaved stereo to mono samples.
//
// The size of src should be twice the size of dst. No bounds checking
// is performed while writing to dst.
func InterleavedStereoToMono(dst, src Slice) {
var (
i, j int
l = src.Len() / 2
)
for ; i < l; i, j = i+1, j+2 {
dst.Set(i, (src.At(j)+src.At(j+1))/2)
}
}