mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 02:20:53 +00:00
updated libopus and Opus build scrips
This commit is contained in:
@@ -31,43 +31,44 @@ do
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Compiling source for $ARCH in directory $OPUS_DIR"
|
echo "Compiling source for $ARCH in directory $OPUS_DIR"
|
||||||
|
echo "cd $OPUS_DIR"
|
||||||
cd $OPUS_DIR
|
cd $OPUS_DIR
|
||||||
|
|
||||||
DIST_DIR=$DIST_DIR_BASE-$ARCH
|
DIST_DIR=$DIST_DIR_BASE-$ARCH
|
||||||
|
echo "mkdir -p $DIST_DIR"
|
||||||
mkdir -p $DIST_DIR
|
mkdir -p $DIST_DIR
|
||||||
CFLAGS_ARCH=$ARCH
|
CFLAGS_ARCH=$ARCH
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
armv7)
|
armv7)
|
||||||
EXTRA_FLAGS="--with-pic --enable-fixed-point"
|
EXTRA_FLAGS="--with-pic --enable-fixed-point"
|
||||||
EXTRA_CFLAGS="-mcpu=cortex-a8 -mfpu=neon"
|
EXTRA_CFLAGS="-mcpu=cortex-a8 -mfpu=neon -miphoneos-version-min=7.1"
|
||||||
PLATFORM="${PLATFORMBASE}/iPhoneOS.platform"
|
PLATFORM="${PLATFORMBASE}/iPhoneOS.platform"
|
||||||
IOSSDK=iPhoneOS${IOSSDK_VER}
|
IOSSDK=iPhoneOS
|
||||||
;;
|
;;
|
||||||
armv7s)
|
armv7s)
|
||||||
EXTRA_FLAGS="--with-pic --enable-fixed-point"
|
EXTRA_FLAGS="--with-pic --enable-fixed-point"
|
||||||
EXTRA_CFLAGS="-mcpu=cortex-a9 -mfpu=neon -miphoneos-version-min=6.0"
|
EXTRA_CFLAGS="-mcpu=cortex-a9 -mfpu=neon -miphoneos-version-min=7.1"
|
||||||
PLATFORM="${PLATFORMBASE}/iPhoneOS.platform"
|
PLATFORM="${PLATFORMBASE}/iPhoneOS.platform"
|
||||||
IOSSDK=iPhoneOS${IOSSDK_VER}
|
IOSSDK=iPhoneOS
|
||||||
;;
|
;;
|
||||||
aarch64)
|
aarch64)
|
||||||
CFLAGS_ARCH="arm64"
|
CFLAGS_ARCH="arm64"
|
||||||
EXTRA_FLAGS="--with-pic --enable-fixed-point"
|
EXTRA_FLAGS="--with-pic --enable-fixed-point"
|
||||||
EXTRA_CFLAGS="-miphoneos-version-min=7.1"
|
EXTRA_CFLAGS="-miphoneos-version-min=7.1"
|
||||||
PLATFORM="${PLATFORMBASE}/iPhoneOS.platform"
|
PLATFORM="${PLATFORMBASE}/iPhoneOS.platform"
|
||||||
IOSSDK=iPhoneOS${IOSSDK_VER}
|
IOSSDK=iPhoneOS
|
||||||
;;
|
;;
|
||||||
x86_64)
|
x86_64)
|
||||||
EXTRA_FLAGS="--with-pic"
|
EXTRA_FLAGS="--with-pic"
|
||||||
EXTRA_CFLAGS="-miphoneos-version-min=7.1"
|
EXTRA_CFLAGS="-miphoneos-version-min=7.1"
|
||||||
PLATFORM="${PLATFORMBASE}/iPhoneSimulator.platform"
|
PLATFORM="${PLATFORMBASE}/iPhoneSimulator.platform"
|
||||||
IOSSDK=iPhoneSimulator${IOSSDK_VER}
|
IOSSDK=iPhoneSimulator
|
||||||
;;
|
;;
|
||||||
i386)
|
i386)
|
||||||
EXTRA_FLAGS="--with-pic"
|
EXTRA_FLAGS="--with-pic"
|
||||||
EXTRA_CFLAGS="-miphoneos-version-min=7.1"
|
EXTRA_CFLAGS="-miphoneos-version-min=7.1"
|
||||||
PLATFORM="${PLATFORMBASE}/iPhoneSimulator.platform"
|
PLATFORM="${PLATFORMBASE}/iPhoneSimulator.platform"
|
||||||
IOSSDK=iPhoneSimulator${IOSSDK_VER}
|
IOSSDK=iPhoneSimulator
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported architecture ${ARCH}"
|
echo "Unsupported architecture ${ARCH}"
|
||||||
@@ -76,7 +77,7 @@ do
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
echo "Configuring opus for $ARCH..."
|
echo "Configuring opus for $ARCH..."
|
||||||
|
echo "./autogen.sh"
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
|
|
||||||
CFLAGS="-g -O2 -pipe -arch ${CFLAGS_ARCH} \
|
CFLAGS="-g -O2 -pipe -arch ${CFLAGS_ARCH} \
|
||||||
@@ -86,7 +87,10 @@ do
|
|||||||
LDFLAGS="-arch ${CFLAGS_ARCH} \
|
LDFLAGS="-arch ${CFLAGS_ARCH} \
|
||||||
-isysroot ${PLATFORM}/Developer/SDKs/${IOSSDK}.sdk \
|
-isysroot ${PLATFORM}/Developer/SDKs/${IOSSDK}.sdk \
|
||||||
-L${PLATFORM}/Developer/SDKs/${IOSSDK}.sdk/usr/lib"
|
-L${PLATFORM}/Developer/SDKs/${IOSSDK}.sdk/usr/lib"
|
||||||
|
|
||||||
|
echo "CFLAGS=$CFLAGS"
|
||||||
|
echo "LDFLAGS=$LDFLAGS"
|
||||||
|
|
||||||
export CFLAGS
|
export CFLAGS
|
||||||
export LDFLAGS
|
export LDFLAGS
|
||||||
|
|
||||||
@@ -100,7 +104,15 @@ do
|
|||||||
export NM="/usr/bin/nm"
|
export NM="/usr/bin/nm"
|
||||||
export RANLIB="/usr/bin/ranlib"
|
export RANLIB="/usr/bin/ranlib"
|
||||||
export STRIP="/usr/bin/strip"
|
export STRIP="/usr/bin/strip"
|
||||||
|
echo "./configure \
|
||||||
|
--prefix=$DIST_DIR \
|
||||||
|
--host=${ARCH}-apple-darwin \
|
||||||
|
--with-sysroot=${PLATFORM}/Developer/SDKs/${IOSSDK}.sdk \
|
||||||
|
--enable-static=yes \
|
||||||
|
--enable-shared=no \
|
||||||
|
--disable-doc \
|
||||||
|
${EXTRA_FLAGS}"
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=$DIST_DIR \
|
--prefix=$DIST_DIR \
|
||||||
--host=${ARCH}-apple-darwin \
|
--host=${ARCH}-apple-darwin \
|
||||||
@@ -111,10 +123,14 @@ do
|
|||||||
${EXTRA_FLAGS}
|
${EXTRA_FLAGS}
|
||||||
|
|
||||||
echo "Installing opus for $ARCH..."
|
echo "Installing opus for $ARCH..."
|
||||||
|
echo "make clean"
|
||||||
make clean
|
make clean
|
||||||
|
echo "make -j$NJOB V=1"
|
||||||
make -j$NJOB V=1
|
make -j$NJOB V=1
|
||||||
|
echo "make install"
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
echo "cd $SCRIPT_DIR"
|
||||||
cd $SCRIPT_DIR
|
cd $SCRIPT_DIR
|
||||||
|
|
||||||
if [ -d $DIST_DIR/bin ]
|
if [ -d $DIST_DIR/bin ]
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ source config.sh
|
|||||||
SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
|
SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
|
||||||
DIST_DIR_BASE=${DIST_DIR_BASE:="$SCRIPT_DIR/dist"}
|
DIST_DIR_BASE=${DIST_DIR_BASE:="$SCRIPT_DIR/dist"}
|
||||||
|
|
||||||
git submodule update --init opus
|
|
||||||
cd opus
|
cd opus
|
||||||
git checkout master
|
git checkout master
|
||||||
git pull origin master
|
git pull origin master
|
||||||
|
|||||||
@@ -616,7 +616,10 @@ OPUS_EXPORT void opus_pcm_soft_clip(float *pcm, int frame_size, int channels, fl
|
|||||||
* merged. Splitting valid Opus packets is always guaranteed to succeed,
|
* merged. Splitting valid Opus packets is always guaranteed to succeed,
|
||||||
* whereas merging valid packets only succeeds if all frames have the same
|
* whereas merging valid packets only succeeds if all frames have the same
|
||||||
* mode, bandwidth, and frame size, and when the total duration of the merged
|
* mode, bandwidth, and frame size, and when the total duration of the merged
|
||||||
* packet is no more than 120 ms.
|
* packet is no more than 120 ms. The 120 ms limit comes from the
|
||||||
|
* specification and limits decoder memory requirements at a point where
|
||||||
|
* framing overhead becomes negligible.
|
||||||
|
*
|
||||||
* The repacketizer currently only operates on elementary Opus
|
* The repacketizer currently only operates on elementary Opus
|
||||||
* streams. It will not manipualte multistream packets successfully, except in
|
* streams. It will not manipualte multistream packets successfully, except in
|
||||||
* the degenerate case where they consist of data from a single stream.
|
* the degenerate case where they consist of data from a single stream.
|
||||||
|
|||||||
@@ -713,6 +713,10 @@ extern "C" {
|
|||||||
OPUS_EXPORT const char *opus_strerror(int error);
|
OPUS_EXPORT const char *opus_strerror(int error);
|
||||||
|
|
||||||
/** Gets the libopus version string.
|
/** Gets the libopus version string.
|
||||||
|
*
|
||||||
|
* Applications may look for the substring "-fixed" in the version string to
|
||||||
|
* determine whether they have a fixed-point or floating-point build at
|
||||||
|
* runtime.
|
||||||
*
|
*
|
||||||
* @returns Version string
|
* @returns Version string
|
||||||
*/
|
*/
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user