react-native-audio-api 0.7.0 → 0.7.1-nightly-d65d4ba-20250806
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/README.md
CHANGED
|
@@ -13,7 +13,7 @@ allowing developers to generate and modify audio in exact same way it is possibl
|
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
|
-
check out the [Getting Started](https://docs.swmansion.com/react-native-audio-api/fundamentals/getting-started) section of our documentation for detailed instructions!
|
|
16
|
+
check out the [Getting Started](https://docs.swmansion.com/react-native-audio-api/docs/fundamentals/getting-started) section of our documentation for detailed instructions!
|
|
17
17
|
|
|
18
18
|
## Roadmap
|
|
19
19
|
|
|
@@ -42,16 +42,21 @@ check out the [Getting Started](https://docs.swmansion.com/react-native-audio-ap
|
|
|
42
42
|
- <sub>[](https://github.com/software-mansion/react-native-audio-api/releases/tag/0.6.0)</sub> **Connect audio param** 🤞 <br />
|
|
43
43
|
Ability to connect Audio nodes to audio params, which will allow for powerful and efficient modulation of audio parameters, creating effects like tremolo, vibrato or complex envelope followers. <br />
|
|
44
44
|
|
|
45
|
-
-
|
|
45
|
+
- <sub>[](https://github.com/software-mansion/react-native-audio-api/releases/tag/0.7.0)</sub>
|
|
46
|
+
**Microphone support** 🎙️ <br />
|
|
46
47
|
Grab audio data from device microphone or connected device, connect it to the audio graph or stream through the internet <br />
|
|
47
48
|
|
|
49
|
+
- <sub>[](https://github.com/software-mansion/react-native-audio-api/releases/tag/0.7.0)</sub>
|
|
50
|
+
**Custom Audio Processor** 🎙️ <br />
|
|
51
|
+
Write your own processing AudioNode <br />
|
|
52
|
+
|
|
48
53
|
- **JS Audio Worklets** 🐎 <br />
|
|
49
54
|
Ability to run JS functions connected to the audio graph running on audio thread allowing for full customization of what happens to the audio signal.
|
|
50
55
|
<br />
|
|
51
56
|
|
|
52
57
|
## Web Audio API Specification Coverage
|
|
53
58
|
|
|
54
|
-
Our current coverage of Web Audio API specification can be found here: [Web Audio API coverage](https://
|
|
59
|
+
Our current coverage of Web Audio API specification can be found here: [Web Audio API coverage](https://docs.swmansion.com/react-native-audio-api/docs/other/web-audio-api-coverage).
|
|
55
60
|
|
|
56
61
|
## Examples
|
|
57
62
|
|
|
@@ -49,10 +49,10 @@ void AudioNode::connect(const std::shared_ptr<AudioParam> ¶m) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
void AudioNode::disconnect() {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
context_->getNodeManager()->addPendingNodeConnection(
|
|
53
|
+
shared_from_this(),
|
|
54
|
+
nullptr,
|
|
55
|
+
AudioNodeManager::ConnectionType::DISCONNECT_ALL);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
void AudioNode::disconnect(const std::shared_ptr<AudioNode> &node) {
|
|
@@ -57,20 +57,24 @@ void AudioNodeManager::addAudioParam(const std::shared_ptr<AudioParam> ¶m) {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
void AudioNodeManager::settlePendingConnections() {
|
|
60
|
-
for (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
std::shared_ptr<AudioNode>
|
|
64
|
-
|
|
65
|
-
ConnectionType type = std::get<2>(*it);
|
|
60
|
+
for (int i = 0; i < audioNodesToConnect_.size(); ++i) {
|
|
61
|
+
auto &connection = audioNodesToConnect_[i];
|
|
62
|
+
std::shared_ptr<AudioNode> from = std::get<0>(connection);
|
|
63
|
+
std::shared_ptr<AudioNode> to = std::get<1>(connection);
|
|
64
|
+
ConnectionType type = std::get<2>(connection);
|
|
66
65
|
|
|
67
66
|
assert(from != nullptr);
|
|
68
|
-
assert(to != nullptr);
|
|
69
67
|
|
|
70
68
|
if (type == ConnectionType::CONNECT) {
|
|
69
|
+
assert(to != nullptr);
|
|
71
70
|
from->connectNode(to);
|
|
72
|
-
} else {
|
|
71
|
+
} else if (type == ConnectionType::DISCONNECT) {
|
|
72
|
+
assert(to != nullptr);
|
|
73
73
|
from->disconnectNode(to);
|
|
74
|
+
} else {
|
|
75
|
+
for (auto &node : from->outputNodes_) {
|
|
76
|
+
from->disconnectNode(node);
|
|
77
|
+
}
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
80
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-audio-api",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-nightly-d65d4ba-20250806",
|
|
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"
|