move parser interface into engine.go

add snapshot field to Client
This commit is contained in:
onyx-and-iris 2026-02-06 00:40:42 +00:00
parent fa704832d5
commit 5933b25114
2 changed files with 6 additions and 5 deletions

View File

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

View File

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