fix(cmd/sointu-play): accidentally used := in inner scope, leading to nil error

This commit is contained in:
vsariola 2021-02-16 09:32:54 +02:00
parent 803184cbe7
commit 0377cd4287

View File

@ -41,7 +41,8 @@ func main() {
}
var audioContext sointu.AudioContext
if *play {
audioContext, err := oto.NewContext()
var err error
audioContext, err = oto.NewContext()
if err != nil {
fmt.Fprintf(os.Stderr, "could not acquire oto AudioContext: %v\n", err)
os.Exit(1)