don't use bufio

This commit is contained in:
filifa 2024-08-22 22:49:05 -05:00
parent f0cd273a5f
commit 5bba14b556
1 changed files with 1 additions and 4 deletions

View File

@ -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)
}