-
Notifications
You must be signed in to change notification settings - Fork 721
Fix type mismatch in opus_multistream_decode_native #336
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
Conversation
|
Merged. I'd be curious if you encountered any other issue with 16-bit ints, since it is hard to test. |
|
Thanks @jmvalin. My platform is actually 32-bit (Tensilica Xtensa LX6), the standard types are just defined a bit weird. I don't recall any other issues with the fixed point build, but I have a recollection of the floating point build having some issues when I accidentally built it. I'll aim to check that out later this week. |
|
@jmvalin Following are the warnings I get from a floating point build of the current master for my platform. It's not entirely obvious to me which of them should be addressed. Happy to go through and put together another PR but not sure how aggressive I should be at retyping or casting things to mute warnings, especially between different modules. There are no (meaningful) warnings if I exclude the floating point build. |
|
Looks like you might have a problem with your build system. silk/fixed/autocorr_FIX.c shouldn't even be compiled for floating point and warnings such as |
|
That's sounds about right, my top level makefile is just a glob of C files. (I know it's not recommended, but it's what has got me off the ground so far. My CMake skills are very weak.) I'll tidy that up at some stage and take another look, when I tried to integrate it nicely initially I got errors I wasn't prepared to track down. |
|
Well, given the warnings above, your build is completely broken and likely would either crash or output garbage. |
|
Yeah, you're right. I was still building with the fixed point headers, fixed now. Edit: #330 has a fix for it which seemingly didn't get merged. |
|
Should be fixed now. Please confirm |
|
I confirm fixed. Building cleanly for fixed and floating point on my platform. Thanks. |
The type of the nb_extensions argument to opus_multistream_decode_native() in the header does not match the implementation. It is defined as (opus_int32) in the C, and (int) in the H.
On some embedded platforms, opus_int32 is not defined as an int type. It may be long int, or other. This causes a compilation failure due to mismatched types.
This PR changes the type in the header to match the implementation to remove this compilation failure.
Bug identified on the ESP32 platform.