Skip to content

Commit

Permalink
Hopefully fix mac
Browse files Browse the repository at this point in the history
  • Loading branch information
ACrazyTown committed Sep 28, 2024
1 parent b18a27f commit 03395d9
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 110 deletions.
1 change: 1 addition & 0 deletions project/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<set name="PLATFORM" value="android-21" if="android" />
<set name="HXCPP_CPP17" value="1" />
<setenv name="MACOSX_DEPLOYMENT_TARGET" value="10.15" if="mac" />

<include name="${HXCPP}/build-tool/BuildCommon.xml" />

Expand Down
87 changes: 31 additions & 56 deletions project/lib/custom/openal/include/config-macos-arm64.h
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
/* API declaration export attribute */
#define AL_API __attribute__((visibility("default")))
#define ALC_API __attribute__((visibility("default")))

/* Define the alignment attribute for externally callable functions. */
#define FORCE_ALIGN

/* Define if HRTF data is embedded in the library */
#define ALSOFT_EMBED_HRTF_DATA

/* Define if we have the C11 aligned_alloc function */
/* #undef HAVE_ALIGNED_ALLOC */

/* Define if we have the posix_memalign function */
#define HAVE_POSIX_MEMALIGN

/* Define if we have the _aligned_malloc function */
/* #undef HAVE__ALIGNED_MALLOC */

/* Define if we have the proc_pidpath function */
/* #undef HAVE_PROC_PIDPATH */

/* Define if we have the getopt function */
/* #undef HAVE_GETOPT */
/* Define if we have DBus/RTKit */
/* #undef HAVE_RTKIT */

/* Define if we have SSE CPU extensions */
#undef HAVE_SSE
#undef HAVE_SSE2
#undef HAVE_SSE3
/* #undef HAVE_SSE4_1 */
/* #define HAVE_SSE4_1 */

/* Define if we have ARM Neon CPU extensions */
#define HAVE_NEON
Expand All @@ -35,23 +28,23 @@
/* Define if we have the OSS backend */
/* #undef HAVE_OSS */

/* Define if we have the PipeWire backend */
/* #undef HAVE_PIPEWIRE */

/* Define if we have the Solaris backend */
/* #undef HAVE_SOLARIS */

/* Define if we have the SndIO backend */
/* #undef HAVE_SNDIO */

/* Define if we have the QSA backend */
/* #undef HAVE_QSA */

/* Define if we have the WASAPI backend */
/* #undef HAVE_WASAPI */
/* #define HAVE_WASAPI */

/* Define if we have the DSound backend */
/* #undef HAVE_DSOUND */
/* #define HAVE_DSOUND */

/* Define if we have the Windows Multimedia backend */
/* #undef HAVE_WINMM */
/* #define HAVE_WINMM */

/* Define if we have the PortAudio backend */
/* #undef HAVE_PORTAUDIO */
Expand All @@ -68,71 +61,53 @@
/* Define if we have the OpenSL backend */
/* #undef HAVE_OPENSL */

/* Define if we have the Oboe backend */
/* #undef HAVE_OBOE */

/* Define if we have the OtherIO backend */
/* #undef HAVE_OTHERIO */

/* Define if we have the Wave Writer backend */
#define HAVE_WAVE

/* Define if we have the SDL2 backend */
/* #undef HAVE_SDL2 */

/* Define if we have the stat function */
#define HAVE_STAT

/* Define to the size of a long int type */
#define SIZEOF_LONG 8

/* Define if we have GCC's format attribute */
#define HAVE_GCC_FORMAT

/* Define if we have dlfcn.h */
#define HAVE_DLFCN_H

/* Define if we have pthread_np.h */
/* #undef HAVE_PTHREAD_NP_H */

/* Define if we have malloc.h */
/* #undef HAVE_MALLOC_H */

/* Define if we have dirent.h */
#define HAVE_DIRENT_H

/* Define if we have cpuid.h */
#undef HAVE_CPUID_H
#define HAVE_CPUID_H

/* Define if we have intrin.h */
/* #undef HAVE_INTRIN_H */

/* Define if we have sys/sysconf.h */
/* #undef HAVE_SYS_SYSCONF_H */
/* #define HAVE_INTRIN_H */

/* Define if we have guiddef.h */
/* #undef HAVE_GUIDDEF_H */

/* Define if we have initguid.h */
/* #undef HAVE_INITGUID_H */
/* #define HAVE_GUIDDEF_H */

/* Define if we have GCC's __get_cpuid() */
#undef HAVE_GCC_GET_CPUID
#define HAVE_GCC_GET_CPUID

/* Define if we have the __cpuid() intrinsic */
/* #undef HAVE_CPUID_INTRINSIC */
/* #define HAVE_CPUID_INTRINSIC */

/* Define if we have the _BitScanForward64() intrinsic */
/* #undef HAVE_BITSCANFORWARD64_INTRINSIC */

/* Define if we have the _BitScanForward() intrinsic */
/* #undef HAVE_BITSCANFORWARD_INTRINSIC */
/* Define if we have SSE intrinsics */
/* #define HAVE_SSE_INTRINSICS */

/* Define if we have pthread_setschedparam() */
#define HAVE_PTHREAD_SETSCHEDPARAM

/* Define if we have pthread_setname_np() */
/* #undef HAVE_PTHREAD_SETNAME_NP */

/* Define if pthread_setname_np() only accepts one parameter */
/* #undef PTHREAD_SETNAME_NP_ONE_PARAM */

/* Define if pthread_setname_np() accepts three parameters */
/* #undef PTHREAD_SETNAME_NP_THREE_PARAMS */

/* Define if we have pthread_set_name_np() */
/* #undef HAVE_PTHREAD_SET_NAME_NP */

/* Define the installation data directory */
/* #undef ALSOFT_INSTALL_DATADIR */

/* Define whether build alsoft for winuwp */
/* #undef ALSOFT_UWP */
83 changes: 29 additions & 54 deletions project/lib/custom/openal/include/config-macos-x86_64.h
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
/* API declaration export attribute */
#define AL_API __attribute__((visibility("default")))
#define ALC_API __attribute__((visibility("default")))

/* Define the alignment attribute for externally callable functions. */
#define FORCE_ALIGN

/* Define if HRTF data is embedded in the library */
#define ALSOFT_EMBED_HRTF_DATA

/* Define if we have the C11 aligned_alloc function */
/* #undef HAVE_ALIGNED_ALLOC */

/* Define if we have the posix_memalign function */
#define HAVE_POSIX_MEMALIGN

/* Define if we have the _aligned_malloc function */
/* #undef HAVE__ALIGNED_MALLOC */

/* Define if we have the proc_pidpath function */
/* #undef HAVE_PROC_PIDPATH */

/* Define if we have the getopt function */
/* #undef HAVE_GETOPT */
/* Define if we have DBus/RTKit */
/* #undef HAVE_RTKIT */

/* Define if we have SSE CPU extensions */
#define HAVE_SSE
#define HAVE_SSE2
#define HAVE_SSE3
/* #undef HAVE_SSE4_1 */
/* #define HAVE_SSE4_1 */

/* Define if we have ARM Neon CPU extensions */
/* #undef HAVE_NEON */
Expand All @@ -35,23 +28,23 @@
/* Define if we have the OSS backend */
/* #undef HAVE_OSS */

/* Define if we have the PipeWire backend */
/* #undef HAVE_PIPEWIRE */

/* Define if we have the Solaris backend */
/* #undef HAVE_SOLARIS */

/* Define if we have the SndIO backend */
/* #undef HAVE_SNDIO */

/* Define if we have the QSA backend */
/* #undef HAVE_QSA */

/* Define if we have the WASAPI backend */
/* #undef HAVE_WASAPI */
/* #define HAVE_WASAPI */

/* Define if we have the DSound backend */
/* #undef HAVE_DSOUND */
/* #define HAVE_DSOUND */

/* Define if we have the Windows Multimedia backend */
/* #undef HAVE_WINMM */
/* #define HAVE_WINMM */

/* Define if we have the PortAudio backend */
/* #undef HAVE_PORTAUDIO */
Expand All @@ -68,71 +61,53 @@
/* Define if we have the OpenSL backend */
/* #undef HAVE_OPENSL */

/* Define if we have the Oboe backend */
/* #undef HAVE_OBOE */

/* Define if we have the OtherIO backend */
/* #undef HAVE_OTHERIO */

/* Define if we have the Wave Writer backend */
#define HAVE_WAVE

/* Define if we have the SDL2 backend */
/* #undef HAVE_SDL2 */

/* Define if we have the stat function */
#define HAVE_STAT

/* Define to the size of a long int type */
#define SIZEOF_LONG 8

/* Define if we have GCC's format attribute */
#define HAVE_GCC_FORMAT

/* Define if we have dlfcn.h */
#define HAVE_DLFCN_H

/* Define if we have pthread_np.h */
/* #undef HAVE_PTHREAD_NP_H */

/* Define if we have malloc.h */
/* #undef HAVE_MALLOC_H */

/* Define if we have dirent.h */
#define HAVE_DIRENT_H

/* Define if we have cpuid.h */
#define HAVE_CPUID_H

/* Define if we have intrin.h */
/* #undef HAVE_INTRIN_H */

/* Define if we have sys/sysconf.h */
/* #undef HAVE_SYS_SYSCONF_H */
/* #define HAVE_INTRIN_H */

/* Define if we have guiddef.h */
/* #undef HAVE_GUIDDEF_H */

/* Define if we have initguid.h */
/* #undef HAVE_INITGUID_H */
/* #define HAVE_GUIDDEF_H */

/* Define if we have GCC's __get_cpuid() */
#define HAVE_GCC_GET_CPUID

/* Define if we have the __cpuid() intrinsic */
/* #undef HAVE_CPUID_INTRINSIC */
/* #define HAVE_CPUID_INTRINSIC */

/* Define if we have the _BitScanForward64() intrinsic */
/* #undef HAVE_BITSCANFORWARD64_INTRINSIC */

/* Define if we have the _BitScanForward() intrinsic */
/* #undef HAVE_BITSCANFORWARD_INTRINSIC */
/* Define if we have SSE intrinsics */
/* #define HAVE_SSE_INTRINSICS */

/* Define if we have pthread_setschedparam() */
#define HAVE_PTHREAD_SETSCHEDPARAM

/* Define if we have pthread_setname_np() */
/* #undef HAVE_PTHREAD_SETNAME_NP */

/* Define if pthread_setname_np() only accepts one parameter */
/* #undef PTHREAD_SETNAME_NP_ONE_PARAM */

/* Define if pthread_setname_np() accepts three parameters */
/* #undef PTHREAD_SETNAME_NP_THREE_PARAMS */

/* Define if we have pthread_set_name_np() */
/* #undef HAVE_PTHREAD_SET_NAME_NP */

/* Define the installation data directory */
/* #undef ALSOFT_INSTALL_DATADIR */

/* Define whether build alsoft for winuwp */
/* #undef ALSOFT_UWP */
2 changes: 2 additions & 0 deletions project/lib/openal-files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@
<compilerflag value="-msse2" unless="HXCPP_ARM64" />
<compilerflag value="-msse3" unless="HXCPP_ARM64" />
<compilerflag value="-mssse3" unless="HXCPP_ARM64" />
<compilerflag value="-std=c11" />
<compilerflag value="-DFORCE_ALIGN=" />

</section>

Expand Down
1 change: 1 addition & 0 deletions src/lime/media/AudioManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class AudioManager
// TODO: Do we need to check if the extension is present?
// If so, this needs to be merged beforehand: https://github.com/openfl/lime/pull/1832
alc.disable(AL.STOP_SOURCES_ON_DISCONNECT_SOFT);

Application.current.onUpdate.add((_) -> {
AudioManager.update();
});
Expand Down

0 comments on commit 03395d9

Please sign in to comment.