Skip to content

Commit 9853363

Browse files
committed
MACOSXPPC: Add sonivox library
Updated to 3.6.14, but this requires a patch for GCC < 8.1
1 parent b9341d9 commit 9853363

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#! /bin/sh
2+
3+
SONIVOX_VERSION=3.6.14
4+
#SONIVOX_SHA256=d625ad6b3375a036bf30cd3b0b40e8dde08f0891bfd3a2960650654bdb50318c
5+
6+
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
7+
HELPERS_DIR=$PACKAGE_DIR/../../../common
8+
. $HELPERS_DIR/functions.sh
9+
10+
do_make_bdir
11+
12+
do_http_fetch sonivox \
13+
"https://github.com/pedrolcl/sonivox/archive/refs/tags/v${SONIVOX_VERSION}.tar.gz" 'tar xzf' #"sha256:${SONIVOX_SHA256}"
14+
15+
# XXX: uses __builtin_mul_overflow/__builtin_add_overflow which were added in GCC 5.0
16+
do_cmake -DBUILD_SONIVOX_SHARED=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLE=OFF -DCMAKE_C_FLAGS="-O2 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wa,-force_cpusubtype_ALL -m32" -DCMAKE_C_COMPILER=/opt/macports-tff/bin/gcc-mp-7 -DCMAKE_CXX_COMPILER=/opt/macports-tff/bin/g++-mp-7 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.4 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk "$@"
17+
18+
do_make VERBOSE=1
19+
20+
do_make install
21+
22+
do_clean_bdir
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Fix "initializer element is not constant" error with GCC
2+
3+
--- a/arm-wt-22k/lib_src/wt_200k_G.c
4+
+++ b/arm-wt-22k/lib_src/wt_200k_G.c
5+
@@ -100,18 +100,18 @@
6+
*/
7+
8+
#ifdef _SAMPLE_RATE_44100
9+
-const EAS_U32 sampleRate = 0xAC44;
10+
+enum { sampleRate = 0xAC44 };
11+
#else
12+
-const EAS_U32 sampleRate = 0x5622;
13+
+enum { sampleRate = 0x5622 };
14+
#endif
15+
16+
const S_EAS easSoundLib = {
17+
0x01534145,
18+
19+
#if defined (_8_BIT_SAMPLES)
20+
- 0x00100000 | sampleRate,
21+
+ 0x00100000 | (EAS_U32)sampleRate,
22+
#else //_16_BIT_SAMPLES
23+
- 0x00200000 | sampleRate,
24+
+ 0x00200000 | (EAS_U32)sampleRate,
25+
#endif
26+
27+
eas_banks,

0 commit comments

Comments
 (0)