{
return opus_decoder_ctl(st, OPUS_GET_LAST_PACKET_DURATION(samples));
}
+
+int
+bridge_decoder_set_complexity(OpusDecoder *st, opus_int32 complexity)
+{
+ return opus_decoder_ctl(st, OPUS_SET_COMPLEXITY(complexity));
+}
*/
import "C"
}
return int(samples), nil
}
+
+// SetComplexity sets the decoder's computational complexity
+func (dec *Decoder) SetComplexity(complexity int) error {
+ res := C.bridge_decoder_set_complexity(dec.p, C.opus_int32(complexity))
+ if res != C.OPUS_OK {
+ return Error(res)
+ }
+ return nil
+}