mirror of
https://github.com/fumiama/ahsai.git
synced 2026-06-21 18:58:24 +08:00
fix: loop
This commit is contained in:
5
ogg.go
5
ogg.go
@@ -14,7 +14,10 @@ func cutstream(s beep.StreamSeekCloser) {
|
|||||||
tmp := make([][2]float64, 1024)
|
tmp := make([][2]float64, 1024)
|
||||||
c := 0
|
c := 0
|
||||||
for c < 6 {
|
for c < 6 {
|
||||||
_, _ = s.Stream(tmp)
|
_, ok := s.Stream(tmp)
|
||||||
|
if !ok {
|
||||||
|
break
|
||||||
|
}
|
||||||
sum := (tmp[0][0] + tmp[0][1]) / 2
|
sum := (tmp[0][0] + tmp[0][1]) / 2
|
||||||
for j := 1; j < 1024; j++ {
|
for j := 1; j < 1024; j++ {
|
||||||
sum += (tmp[j][0] + tmp[j][1]) / 2
|
sum += (tmp[j][0] + tmp[j][1]) / 2
|
||||||
|
|||||||
Reference in New Issue
Block a user