-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmultistream_decoder_controls.go
More file actions
61 lines (51 loc) · 1.89 KB
/
multistream_decoder_controls.go
File metadata and controls
61 lines (51 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package gopus
// Reset clears the decoder state for a new stream.
// Call this when starting to decode a new audio stream.
func (d *MultistreamDecoder) Reset() {
d.dec.Reset()
d.lastFrameSize = 960
}
// Channels returns the number of audio channels.
func (d *MultistreamDecoder) Channels() int {
return d.channels
}
// SampleRate returns the sample rate in Hz.
func (d *MultistreamDecoder) SampleRate() int {
return d.sampleRate
}
// Streams returns the total number of elementary streams.
func (d *MultistreamDecoder) Streams() int {
return d.dec.Streams()
}
// CoupledStreams returns the number of coupled (stereo) streams.
func (d *MultistreamDecoder) CoupledStreams() int {
return d.dec.CoupledStreams()
}
// SetIgnoreExtensions toggles whether unknown packet extensions should be ignored.
func (d *MultistreamDecoder) SetIgnoreExtensions(ignore bool) {
d.ignoreExtensions = ignore
}
// IgnoreExtensions reports whether unknown packet extensions are ignored.
func (d *MultistreamDecoder) IgnoreExtensions() bool {
return d.ignoreExtensions
}
// SetOSCEBWE toggles libopus's optional ENABLE_OSCE_BWE decoder extension.
//
// The default gopus build does not enable this extension; check
// SupportsOptionalExtension(OptionalExtensionOSCEBWE) and expect
// ErrUnsupportedExtension when unavailable.
func (d *MultistreamDecoder) SetOSCEBWE(_ bool) error {
return ErrUnsupportedExtension
}
// OSCEBWE reports whether the optional OSCE bandwidth extension path is enabled.
func (d *MultistreamDecoder) OSCEBWE() (bool, error) {
return false, ErrUnsupportedExtension
}
// SetDNNBlob loads the optional libopus USE_WEIGHTS_FILE decoder model blob.
//
// The default gopus build does not enable this extension; check
// SupportsOptionalExtension(OptionalExtensionDNNBlob) and expect
// ErrUnsupportedExtension when unavailable.
func (d *MultistreamDecoder) SetDNNBlob(_ []byte) error {
return ErrUnsupportedExtension
}