Skip to content

Commit 13e94be

Browse files
authored
Merge pull request #523 from MarcosTypeAP/master
Fix rl.LoadWaveSamples returning only half of the samples
2 parents 042744a + 7cd1832 commit 13e94be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

raylib/raudio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ func WaveCrop(wave *Wave, initFrame int32, finalFrame int32) {
333333
func LoadWaveSamples(wave Wave) []float32 {
334334
cwave := wave.cptr()
335335
ret := C.LoadWaveSamples(*cwave)
336-
v := unsafe.Slice((*float32)(unsafe.Pointer(ret)), wave.FrameCount)
336+
v := unsafe.Slice((*float32)(unsafe.Pointer(ret)), wave.FrameCount*wave.Channels)
337337
return v
338338
}
339339

0 commit comments

Comments
 (0)