-
-
Notifications
You must be signed in to change notification settings - Fork 487
Description
Hi,
As part of my work on isle-portable, I've been trying to port LEGO Island to the OG Xbox. For 3D audio, isle-portable utilises miniaudio, which works most of the time on most platforms. However, attempting to compile for the Xbox throws many, many errors, which I have been unable to fix.
I believe that many of these issues exist within the core of miniaudio, and even disabling every single backend doesn't make a difference.
The first error is fairly simple;
/home/voxeltek/isle-xbox/build/_deps/miniaudio-src/miniaudio.h:11556:10: fatal error: 'sys/stat.h' file not found
11556 | #include <sys/stat.h> /* For fstat(), etc. */
| ^~~~~~~~~~~~
I've found that this can be fixed simply by changing from <sys/stat.h> to <stat.h>. However, once that is fixed, things get significantly worse.
/home/voxeltek/isle-xbox/build/_deps/miniaudio-src/miniaudio.h:12039:13: error: call to undeclared function '_controlfp_s'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
12039 | _controlfp_s(&prevState, 0, 0);
| ^
/home/voxeltek/isle-xbox/build/_deps/miniaudio-src/miniaudio.h:12040:47: error: use of undeclared identifier '_DN_FLUSH'
12040 | _controlfp_s(&unused, prevState | _DN_FLUSH, _MCW_DN);
| ^
/home/voxeltek/isle-xbox/build/_deps/miniaudio-src/miniaudio.h:12040:58: error: use of undeclared identifier '_MCW_DN'
12040 | _controlfp_s(&unused, prevState | _DN_FLUSH, _MCW_DN);
| ^
This kinda thing continues for a bit, complaining about stuff like _wfopen_s missing, BY_HANDLE_FILE_INFORMATION being undefined, etc etc.
I believe much of this is a problem due to the NXDK defining both MSVC and _WIN32, however undefining them causes miniaudio to instead use different functions, which also don't appear to exist on the Xbox.
It's possible that this is moreso an issue with NXDK instead of miniaudio, but I figured I should report this here.
Kind regards,
@VoxelTek