Skip to content

Conversation

avezina-ubik
Copy link

In order to support deep PLC, libopus added OPUS_SET_COMPLEXITY() to the decoder API.

This PR adds SetComplexity method to the decoder.

Note that if libopus < 1.5 this function will return ErrUnimplemented so users could easily ignore it like this:

dec, err := opus.NewDecoder(48000, 1)
if err != nil {
	// ... handle error
}

err = dec.SetComplexity(10)
if err != nil && err != opus.ErrUnimplemented {
	// ... handle error
}

@avezina-ubik
Copy link
Author

This should help #54

@jackspirou
Copy link

@hraban curious if this can be merged?

@hraban
Copy link
Owner

hraban commented Feb 13, 2025

Yes looks great sorry I forgot but it's on my radar will restore my go dev env in a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants