Closed colinmarc closed 7 months ago
Ok, the answer was in fact staring me in the face in the libopus docs (emphasis mine):
opus_decode() and opus_decode_float() return the number of samples (per channel) decoded from the packet.
Hopefully this helps someone else not get stuck on that.
I'm pretty confused about the following behavior:
The output buffer is filled to 960 samples, as expected (that's 10ms of stereo samples), but the returned size is 480.
get_nb_samples
returns 480, but passing a length 480 output buffer results inBufferTooSmall
.Is this just the expected behavior for libopus? I can't find it documented everywhere, but I also don't see anywhere this would be a bug in opus-rs. I haven't managed to test this using the C library yet.