react-native-audio-api 0.10.0-nightly-b8bad60-20251104 → 0.10.0-nightly-44925d7-20251105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,9 +14,6 @@ set(FFMPEG_INCLUDE_DIR ${COMMON_CPP_DIR}/audioapi/external/ffmpeg_include)
|
|
|
14
14
|
set(EXTERNAL_DIR ${COMMON_CPP_DIR}/audioapi/external)
|
|
15
15
|
set(JNI_LIBS_DIR ${COMMON_CPP_DIR}/../../android/src/main/jniLibs)
|
|
16
16
|
|
|
17
|
-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-Bsymbolic")
|
|
18
|
-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-Bsymbolic")
|
|
19
|
-
|
|
20
17
|
add_library(react-native-audio-api SHARED ${ANDROID_CPP_SOURCES} ${COMMON_CPP_SOURCES})
|
|
21
18
|
|
|
22
19
|
foreach(lib IN ITEMS opus opusfile ogg vorbis vorbisenc vorbisfile crypto ssl)
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
#include <string>
|
|
6
6
|
#include <memory>
|
|
7
7
|
|
|
8
|
+
#if ANDROID
|
|
9
|
+
#include <fbjni/detail/Environment.h>
|
|
10
|
+
#endif
|
|
11
|
+
|
|
8
12
|
#ifndef RN_AUDIO_API_TEST
|
|
9
13
|
#define RN_AUDIO_API_TEST 0
|
|
10
14
|
#endif
|
|
@@ -71,7 +75,7 @@ struct RuntimeRegistry {
|
|
|
71
75
|
|
|
72
76
|
#if ANDROID
|
|
73
77
|
~RuntimeRegistry() {
|
|
74
|
-
jni::ThreadScope::WithClassLoader(
|
|
78
|
+
facebook::jni::ThreadScope::WithClassLoader(
|
|
75
79
|
[this]() {
|
|
76
80
|
uiRuntime.reset();
|
|
77
81
|
audioRuntime.reset();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-audio-api",
|
|
3
|
-
"version": "0.10.0-nightly-
|
|
3
|
+
"version": "0.10.0-nightly-44925d7-20251105",
|
|
4
4
|
"description": "react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification",
|
|
5
5
|
"bin": {
|
|
6
6
|
"setup-rn-audio-api-web": "./scripts/setup-rn-audio-api-web.js"
|
|
@@ -11,37 +11,46 @@ DOWNLOAD_NAMES=(
|
|
|
11
11
|
# Use a temporary directory for downloads, ensuring it exists
|
|
12
12
|
TEMP_DOWNLOAD_DIR="$(pwd)/audioapi-binaries-temp"
|
|
13
13
|
mkdir -p "$TEMP_DOWNLOAD_DIR"
|
|
14
|
-
|
|
15
|
-
then
|
|
14
|
+
|
|
15
|
+
if [ "$1" == "android" ]; then
|
|
16
16
|
PROJECT_ROOT="$(pwd)/.."
|
|
17
17
|
else
|
|
18
18
|
PROJECT_ROOT="$(pwd)"
|
|
19
19
|
fi
|
|
20
20
|
|
|
21
|
+
JNILIBS_DESTINATION="${PROJECT_ROOT}/android/src/main"
|
|
22
|
+
NORMAL_DESTINATION="${PROJECT_ROOT}/common/cpp/audioapi/external"
|
|
23
|
+
|
|
21
24
|
for name in "${DOWNLOAD_NAMES[@]}"; do
|
|
22
25
|
ARCH_URL="${MAIN_DOWNLOAD_URL}/${TAG}/${name}"
|
|
23
26
|
ZIP_FILE_PATH="${TEMP_DOWNLOAD_DIR}/${name}"
|
|
24
27
|
|
|
28
|
+
# Get the directory name from the zip name (e.g., "armeabi-v7a.zip" -> "armeabi-v7a")
|
|
29
|
+
EXTRACTED_DIR_NAME="${name%.zip}"
|
|
30
|
+
|
|
31
|
+
# Determine the final output path
|
|
25
32
|
if [[ "$name" == "jniLibs.zip" ]]; then
|
|
26
|
-
OUTPUT_DIR="${
|
|
33
|
+
OUTPUT_DIR="${JNILIBS_DESTINATION}"
|
|
27
34
|
else
|
|
28
|
-
OUTPUT_DIR="${
|
|
35
|
+
OUTPUT_DIR="${NORMAL_DESTINATION}"
|
|
29
36
|
fi
|
|
37
|
+
FINAL_CHECK_PATH="${OUTPUT_DIR}/${EXTRACTED_DIR_NAME}"
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if [ -f "$ZIP_FILE_PATH" ]; then
|
|
34
|
-
echo "Zip file already exists locally. Skipping download."
|
|
39
|
+
if [ -d "$FINAL_CHECK_PATH" ]; then
|
|
35
40
|
continue
|
|
36
41
|
fi
|
|
42
|
+
|
|
43
|
+
# If we are here, the directory does not exist, so we download and unzip.
|
|
37
44
|
echo "Downloading from: $ARCH_URL"
|
|
38
45
|
curl -fsSL "$ARCH_URL" -o "$ZIP_FILE_PATH"
|
|
39
46
|
|
|
40
47
|
if [ $? -ne 0 ]; then
|
|
48
|
+
echo "Error: Download failed for ${name}."
|
|
41
49
|
rm -f "$ZIP_FILE_PATH"
|
|
42
50
|
continue
|
|
43
51
|
fi
|
|
44
52
|
|
|
53
|
+
echo "Unzipping ${name} to ${OUTPUT_DIR}"
|
|
45
54
|
unzip -o "$ZIP_FILE_PATH" -d "$OUTPUT_DIR"
|
|
46
55
|
|
|
47
56
|
# Clean up any __MACOSX directories that may have been created
|
|
@@ -21,8 +21,8 @@ function validateVersion() {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
if (!validateVersion()) {
|
|
24
|
-
console.
|
|
25
|
-
'Incompatible version of react-native-audio-worklets detected. Please install a compatible version.',
|
|
24
|
+
console.warn(
|
|
25
|
+
'[RNAudioApi] Incompatible version of react-native-audio-worklets detected. Please install a compatible version if you want to use worklet nodes in react-native-audio-api.',
|
|
26
26
|
);
|
|
27
27
|
process.exit(1);
|
|
28
28
|
}
|