Only support CELT for now
Assert that Hybrid or Silk wasn't selected
This commit is contained in:
parent
d6b193aba5
commit
0c432b922c
|
@ -22,5 +22,9 @@ func (d *Decoder) Decode(in []byte) (bandwidth Bandwidth, isStereo bool, frames
|
|||
return 0, false, nil, fmt.Errorf("%w: %d", errUnsupportedFrameCode, tocHeader.frameCode())
|
||||
}
|
||||
|
||||
if cfg.mode() != configurationModeCELTOnly {
|
||||
return 0, false, nil, fmt.Errorf("%w: %d", errUnsupportedConfigurationMode, cfg.mode())
|
||||
}
|
||||
|
||||
return cfg.bandwidth(), tocHeader.isStereo(), nil, nil
|
||||
}
|
||||
|
|
|
@ -9,4 +9,6 @@ var (
|
|||
errTooShortForArbitraryLengthFrames = errors.New("packet is too short to contain arbitrary length frames")
|
||||
errArbitraryLengthFrameVBRUnsupported = errors.New("arbitrary length frames with VBR is unsupported")
|
||||
errArbitraryLengthFramePaddingUnsupported = errors.New("arbitrary length frames with padding is unsupported")
|
||||
|
||||
errUnsupportedConfigurationMode = errors.New("unsupported configuration mode")
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue