don't use bufio
This commit is contained in:
parent
f0cd273a5f
commit
5bba14b556
5
main.go
5
main.go
|
@ -10,7 +10,6 @@ import "github.com/veandco/go-sdl2/sdl"
|
|||
import "C"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/binary"
|
||||
"os"
|
||||
"time"
|
||||
|
@ -48,8 +47,6 @@ func main() {
|
|||
|
||||
bufSize := 2048
|
||||
|
||||
reader := bufio.NewReaderSize(os.Stdin, bufSize)
|
||||
|
||||
running := true
|
||||
for running {
|
||||
for event := sdl.PollEvent(); event != nil; event = sdl.PollEvent() {
|
||||
|
@ -63,7 +60,7 @@ func main() {
|
|||
|
||||
audioData := make([]int16, bufSize)
|
||||
|
||||
err = binary.Read(reader, binary.LittleEndian, audioData)
|
||||
err = binary.Read(os.Stdin, binary.LittleEndian, audioData)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue