1
0
mirror of https://github.com/fumiama/ahsai.git synced 2026-06-07 00:30:24 +08:00

fix: loop

This commit is contained in:
fumiama
2022-08-08 22:21:41 +08:00
parent 3f3bf32553
commit 8bc34ffb89

5
ogg.go
View File

@@ -14,7 +14,10 @@ func cutstream(s beep.StreamSeekCloser) {
tmp := make([][2]float64, 1024)
c := 0
for c < 6 {
_, _ = s.Stream(tmp)
_, ok := s.Stream(tmp)
if !ok {
break
}
sum := (tmp[0][0] + tmp[0][1]) / 2
for j := 1; j < 1024; j++ {
sum += (tmp[j][0] + tmp[j][1]) / 2