[Docs] Clarify return value for opus_decode() and opus_decode_float() functions #388
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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) foropus_decode()
andopus_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 ;)