react-native-audio-api 0.11.0-nightly-befc3c6-20251202 → 0.11.0-nightly-0d7455c-20251203
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.
- package/android/src/main/cpp/audioapi/android/AudioAPIModule.cpp +0 -5
- package/android/src/main/cpp/audioapi/android/AudioAPIModule.h +0 -1
- package/android/src/main/java/com/swmansion/audioapi/AudioAPIModule.kt +1 -4
- package/common/cpp/audioapi/AudioAPIModuleInstaller.h +0 -17
- package/common/cpp/audioapi/core/effects/IIRFilterNode.h +0 -1
- package/ios/audioapi/ios/AudioAPIModule.mm +0 -2
- package/package.json +3 -8
|
@@ -50,7 +50,6 @@ void AudioAPIModule::registerNatives() {
|
|
|
50
50
|
makeNativeMethod(
|
|
51
51
|
"invokeHandlerWithEventNameAndEventBody",
|
|
52
52
|
AudioAPIModule::invokeHandlerWithEventNameAndEventBody),
|
|
53
|
-
makeNativeMethod("closeAllContexts", AudioAPIModule::closeAllContexts),
|
|
54
53
|
});
|
|
55
54
|
}
|
|
56
55
|
|
|
@@ -96,8 +95,4 @@ void AudioAPIModule::invokeHandlerWithEventNameAndEventBody(
|
|
|
96
95
|
audioEventHandlerRegistry_->invokeHandlerWithEventBody(eventName->toStdString(), body);
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
|
-
|
|
100
|
-
void AudioAPIModule::closeAllContexts() {
|
|
101
|
-
AudioAPIModuleInstaller::closeAllContexts();
|
|
102
|
-
}
|
|
103
98
|
} // namespace audioapi
|
|
@@ -34,7 +34,6 @@ class AudioAPIModule : public jni::HybridClass<AudioAPIModule> {
|
|
|
34
34
|
|
|
35
35
|
void injectJSIBindings();
|
|
36
36
|
void invokeHandlerWithEventNameAndEventBody(jni::alias_ref<jni::JString> eventName, jni::alias_ref<jni::JMap<jstring, jobject>> eventBody);
|
|
37
|
-
void closeAllContexts();
|
|
38
37
|
|
|
39
38
|
private:
|
|
40
39
|
friend HybridBase;
|
|
@@ -40,8 +40,6 @@ class AudioAPIModule(
|
|
|
40
40
|
eventBody: Map<String, Any>,
|
|
41
41
|
)
|
|
42
42
|
|
|
43
|
-
private external fun closeAllContexts()
|
|
44
|
-
|
|
45
43
|
init {
|
|
46
44
|
try {
|
|
47
45
|
System.loadLibrary("react-native-audio-api")
|
|
@@ -77,7 +75,7 @@ class AudioAPIModule(
|
|
|
77
75
|
}
|
|
78
76
|
|
|
79
77
|
override fun onHostDestroy() {
|
|
80
|
-
|
|
78
|
+
// do nothing
|
|
81
79
|
}
|
|
82
80
|
|
|
83
81
|
override fun initialize() {
|
|
@@ -85,7 +83,6 @@ class AudioAPIModule(
|
|
|
85
83
|
}
|
|
86
84
|
|
|
87
85
|
override fun invalidate() {
|
|
88
|
-
closeAllContexts()
|
|
89
86
|
reactContext.get()?.removeLifecycleEventListener(this)
|
|
90
87
|
// think about cleaning up resources, singletons etc.
|
|
91
88
|
}
|
|
@@ -23,9 +23,6 @@ namespace audioapi {
|
|
|
23
23
|
using namespace facebook;
|
|
24
24
|
|
|
25
25
|
class AudioAPIModuleInstaller {
|
|
26
|
-
private:
|
|
27
|
-
inline static std::vector<std::weak_ptr<AudioContext>> contexts_ = {};
|
|
28
|
-
|
|
29
26
|
public:
|
|
30
27
|
static void injectJSIBindings(
|
|
31
28
|
jsi::Runtime *jsiRuntime,
|
|
@@ -56,19 +53,6 @@ class AudioAPIModuleInstaller {
|
|
|
56
53
|
jsi::Object::createFromHostObject(*jsiRuntime, audioEventHandlerRegistryHostObject));
|
|
57
54
|
}
|
|
58
55
|
|
|
59
|
-
static void closeAllContexts() {
|
|
60
|
-
for (auto it = contexts_.begin(); it != contexts_.end(); ++it) {
|
|
61
|
-
auto weakContext = *it;
|
|
62
|
-
|
|
63
|
-
if (auto context = weakContext.lock()) {
|
|
64
|
-
context->close();
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
it = contexts_.erase(it);
|
|
68
|
-
--it;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
56
|
private:
|
|
73
57
|
static jsi::Function getCreateAudioContextFunction(
|
|
74
58
|
jsi::Runtime *jsiRuntime,
|
|
@@ -97,7 +81,6 @@ class AudioAPIModuleInstaller {
|
|
|
97
81
|
|
|
98
82
|
audioContext = std::make_shared<AudioContext>(
|
|
99
83
|
sampleRate, audioEventHandlerRegistry, runtimeRegistry);
|
|
100
|
-
AudioAPIModuleInstaller::contexts_.push_back(audioContext);
|
|
101
84
|
|
|
102
85
|
auto audioContextHostObject =
|
|
103
86
|
std::make_shared<AudioContextHostObject>(audioContext, &runtime, jsCallInvoker);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-audio-api",
|
|
3
|
-
"version": "0.11.0-nightly-
|
|
3
|
+
"version": "0.11.0-nightly-0d7455c-20251203",
|
|
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"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"type": "git",
|
|
73
73
|
"url": "git+https://github.com/software-mansion/react-native-audio-api.git"
|
|
74
74
|
},
|
|
75
|
-
"author": "Software Mansion
|
|
75
|
+
"author": "Software Mansion (https://github.com/software-mansion)",
|
|
76
76
|
"license": "MIT",
|
|
77
77
|
"bugs": {
|
|
78
78
|
"url": "https://github.com/software-mansion/react-native-audio-api/issues"
|
|
@@ -84,12 +84,7 @@
|
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"react": "*",
|
|
86
86
|
"react-native": "*",
|
|
87
|
-
"react-native-worklets": "
|
|
88
|
-
},
|
|
89
|
-
"peerDependenciesMeta": {
|
|
90
|
-
"react-native-worklets": {
|
|
91
|
-
"optional": true
|
|
92
|
-
}
|
|
87
|
+
"react-native-worklets": "*"
|
|
93
88
|
},
|
|
94
89
|
"devDependencies": {
|
|
95
90
|
"@babel/cli": "^7.20.0",
|