refactor: change decoder init parameter

This commit is contained in:
Unlock Music Dev
2022-12-04 23:05:38 +08:00
parent ad64a0f91d
commit ea3236e14b
10 changed files with 32 additions and 20 deletions

View File

@@ -16,8 +16,8 @@ type Decoder struct {
audio io.Reader
}
func NewDecoder(rd io.ReadSeeker) common.Decoder {
return &Decoder{rd: rd}
func NewDecoder(p *common.DecoderParams) common.Decoder {
return &Decoder{rd: p.Reader}
}
func (d *Decoder) Validate() error {