client: add convenience function SetupAndPlay()

This commit is contained in:
aler9
2021-11-28 12:45:50 +01:00
parent a5d0128654
commit 7a521b9784
4 changed files with 16 additions and 27 deletions

View File

@@ -93,16 +93,8 @@ func main() {
}
}
// setup all tracks
for _, t := range tracks {
_, err := c.Setup(true, baseURL, t, 0, 0)
if err != nil {
panic(err)
}
}
// start reading tracks
_, err = c.Play(nil)
err = c.SetupAndPlay(tracks, baseURL)
if err != nil {
panic(err)
}