Skip to content

Commit

Permalink
Merge pull request gen2brain#9 from rgeorgiev583/choppy_audio_fix
Browse files Browse the repository at this point in the history
playback example: fix a bug where audio is choppy
  • Loading branch information
gen2brain authored Apr 15, 2019
2 parents 36ec91e + e8a71e7 commit 9100cfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _examples/playback/playback.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func main() {
sampleSize := uint32(malgo.SampleSizeInBytes(deviceConfig.Format))
// This is the function that's used for sending more data to the device for playback.
onSendSamples := func(frameCount uint32, samples []byte) uint32 {
n, _ := reader.Read(samples)
n, _ := io.ReadFull(reader, samples)
return uint32(n) / uint32(channels) / sampleSize
}

Expand Down

0 comments on commit 9100cfc

Please sign in to comment.