xlab / vorbis-go

Package vorbis provides Go bindings for OggVorbis implementation by the Xiph.Org Foundation.
26 stars 7 forks source link

constant 4294967296 overflows int on armhf #10

Open nanu-c opened 4 years ago

nanu-c commented 4 years ago
# _/home/nanu/go/src/github.com/xlab/vorbis-go/cmd/vorbis-player
../../../main.go:154:14: constant 4294967296 overflows int
../../../main.go:154:14: array bound is too large

this line out := (*(*[1 << 32]float32)(unsafe.Pointer(output)))[:int(sampleCount)*channels] could be changed to out := (*(*[1 << 20]float32)(unsafe.Pointer(output)))[:int(sampleCount)*channels]