Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Clarify return value for opus_decode() and opus_decode_float() functions #388

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MrOnlineCoder
Copy link

Although being explicitly mentioned in the opus_decoder group in documentation (like this https://opus-codec.org/docs/opus_api-1.5/group__opus__decoder.html#details), the actual functions documentation (@returns annotations) for opus_decode() and opus_decode_float() do not specify if the returned value is equal to amount of samples per channel, or samples of all channels combined (basically amount of elements in output pcm array). I've been integrating Opus and some other codecs into a project at once, and because of a bit different APIs, silently relied on inline functions documentation, and mistakenly assumed that returned amount of samples is both channels combined, resulting in wrong audio output and a bit of debugging :D. The fact that output PCM values are interleaved also contributed to that. So this PR just adds that small clarification to both of these functions.

Blame of not being an attentive documentation reader is still surely on me ;)

@MrOnlineCoder MrOnlineCoder changed the title [Docs] Clarify return value for decode() functions [Docs] Clarify return value for opus_decode() and opus_decode_float() functions Jan 14, 2025
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.

1 participant