Matias Lahti 5e45e4f1f4 feat(tracker): hook up audio to tracker, we have liftoff
audio still a bit crackly; should probably decouple actual row ticking and rendering of audio (but how does that work with tempo ops?)

sequencer goroutine is a bit weird, too, should rethink
2020-11-08 04:17:21 +02:00

32 lines
508 B
Go

package main
import (
"fmt"
"gioui.org/app"
"gioui.org/unit"
"github.com/vsariola/sointu/go4k/audio/oto"
"github.com/vsariola/sointu/go4k/tracker"
"os"
)
func main() {
plr, err := oto.NewPlayer()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
defer plr.Close()
go func() {
w := app.NewWindow(
app.Size(unit.Dp(800), unit.Dp(600)),
app.Title("Sointu Tracker"),
)
if err := tracker.New(plr).Run(w); err != nil {
fmt.Println(err)
os.Exit(1)
}
os.Exit(0)
}()
app.Main()
}