Skip to content

Commit

Permalink
Increase supported libflac version to 1.3.2
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215214894
  • Loading branch information
erdemguven authored and ojw28 committed Oct 1, 2018
1 parent 7940fdf commit 6cc049f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions extensions/flac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ EXOPLAYER_ROOT="$(pwd)"
FLAC_EXT_PATH="${EXOPLAYER_ROOT}/extensions/flac/src/main"
```

* Download the [Android NDK][] and set its location in an environment variable:
* Download the [Android NDK][] (version <= 17c) and set its location in an
environment variable:

```
NDK_PATH="<path to Android NDK>"
```

* Download and extract flac-1.3.1 as "${FLAC_EXT_PATH}/jni/flac" folder:
* Download and extract flac-1.3.2 as "${FLAC_EXT_PATH}/jni/flac" folder:

```
cd "${FLAC_EXT_PATH}/jni" && \
curl https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.3.1.tar.xz | tar xJ && \
mv flac-1.3.1 flac
curl https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.3.2.tar.xz | tar xJ && \
mv flac-1.3.2 flac
```

* Build the JNI native libraries from the command line:
Expand Down
4 changes: 2 additions & 2 deletions extensions/flac/src/main/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/flac/src/libFLAC/include
LOCAL_SRC_FILES := $(FLAC_SOURCES)

LOCAL_CFLAGS += '-DVERSION="1.3.1"' -DFLAC__NO_MD5 -DFLAC__INTEGER_ONLY_LIBRARY -DFLAC__NO_ASM
LOCAL_CFLAGS += '-DPACKAGE_VERSION="1.3.2"' -DFLAC__NO_MD5 -DFLAC__INTEGER_ONLY_LIBRARY
LOCAL_CFLAGS += -D_REENTRANT -DPIC -DU_COMMON_IMPLEMENTATION -fPIC -DHAVE_SYS_PARAM_H
LOCAL_CFLAGS += -O3 -funroll-loops -finline-functions
LOCAL_CFLAGS += -O3 -funroll-loops -finline-functions -DFLAC__NO_ASM '-DFLAC__HAS_OGG=0'

LOCAL_LDLIBS := -llog -lz -lm
include $(BUILD_SHARED_LIBRARY)
2 changes: 1 addition & 1 deletion extensions/flac/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
APP_OPTIM := release
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti
APP_PLATFORM := android-9
APP_PLATFORM := android-14

0 comments on commit 6cc049f

Please sign in to comment.