react-native-audio-api 0.9.2 → 0.9.3

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.
@@ -53,8 +53,6 @@ class AudioAPIModule(
53
53
  if (BuildConfig.RN_AUDIO_API_ENABLE_WORKLETS) {
54
54
  try {
55
55
  workletsModule = reactContext.getNativeModule("WorkletsModule")
56
- reanimatedModule = reactContext.getNativeModule("ReanimatedModule")
57
- reanimatedModule
58
56
  } catch (ex: Exception) {
59
57
  throw RuntimeException("WorkletsModule not found - make sure react-native-worklets is properly installed")
60
58
  }
@@ -77,11 +75,11 @@ class AudioAPIModule(
77
75
  }
78
76
 
79
77
  override fun onHostPause() {
80
- closeAllContexts()
78
+ // do nothing
81
79
  }
82
80
 
83
81
  override fun onHostDestroy() {
84
- // do nothing
82
+ closeAllContexts()
85
83
  }
86
84
 
87
85
  override fun initialize() {
@@ -89,6 +87,8 @@ class AudioAPIModule(
89
87
  }
90
88
 
91
89
  override fun invalidate() {
90
+ closeAllContexts()
91
+ reactContext.get()?.removeLifecycleEventListener(this)
92
92
  // think about cleaning up resources, singletons etc.
93
93
  }
94
94
 
@@ -18,8 +18,7 @@ class IOSAudioRecorder : public AudioRecorder {
18
18
  IOSAudioRecorder(
19
19
  float sampleRate,
20
20
  int bufferLength,
21
- const std::shared_ptr<AudioEventHandlerRegistry>
22
- &audioEventHandlerRegistry);
21
+ const std::shared_ptr<AudioEventHandlerRegistry> &audioEventHandlerRegistry);
23
22
 
24
23
  ~IOSAudioRecorder() override;
25
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-audio-api",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
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"