mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-02-26 08:19:11 +00:00
move parser interface into engine.go
add snapshot field to Client
This commit is contained in:
parent
fa704832d5
commit
5933b25114
@ -10,10 +10,6 @@ import (
|
||||
"github.com/hypebeast/go-osc/osc"
|
||||
)
|
||||
|
||||
type parser interface {
|
||||
Parse(data []byte) (*osc.Message, error)
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
engine
|
||||
Main *Main
|
||||
@ -60,10 +56,11 @@ func NewClient(mixerIP string, mixerPort int, opts ...Option) (*Client, error) {
|
||||
c := &Client{
|
||||
engine: *e,
|
||||
}
|
||||
c.Main = newMain(c)
|
||||
c.Main = newMainStereo(c)
|
||||
c.Strip = NewStrip(c)
|
||||
c.Bus = NewBus(c)
|
||||
c.HeadAmp = NewHeadAmp(c)
|
||||
c.Snapshot = NewSnapshot(c)
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
||||
@ -9,6 +9,10 @@ import (
|
||||
"github.com/hypebeast/go-osc/osc"
|
||||
)
|
||||
|
||||
type parser interface {
|
||||
Parse(data []byte) (*osc.Message, error)
|
||||
}
|
||||
|
||||
type engine struct {
|
||||
Kind MixerKind
|
||||
conn *net.UDPConn
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user