react-native-audio-api 0.11.0-nightly-c0ffb48-20251211 → 0.11.0-nightly-ca64ced-20251212

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.
@@ -51,6 +51,10 @@ BiquadFilterNode::BiquadFilterNode(BaseAudioContext *context) : AudioNode(contex
51
51
  gainParam_ = std::make_shared<AudioParam>(
52
52
  0.0f, MOST_NEGATIVE_SINGLE_FLOAT, 40 * LOG10_MOST_POSITIVE_SINGLE_FLOAT, context);
53
53
  type_ = BiquadFilterType::LOWPASS;
54
+ x1_.resize(MAX_CHANNEL_COUNT, 0.0f);
55
+ x2_.resize(MAX_CHANNEL_COUNT, 0.0f);
56
+ y1_.resize(MAX_CHANNEL_COUNT, 0.0f);
57
+ y2_.resize(MAX_CHANNEL_COUNT, 0.0f);
54
58
  isInitialized_ = true;
55
59
  channelCountMode_ = ChannelCountMode::MAX;
56
60
  }
@@ -390,10 +394,10 @@ std::shared_ptr<AudioBus> BiquadFilterNode::processNode(
390
394
  for (int c = 0; c < numChannels; ++c) {
391
395
  auto channelData = processingBus->getChannel(c)->getData();
392
396
 
393
- x1 = x1_;
394
- x2 = x2_;
395
- y1 = y1_;
396
- y2 = y2_;
397
+ x1 = x1_[c];
398
+ x2 = x2_[c];
399
+ y1 = y1_[c];
400
+ y2 = y2_[c];
397
401
 
398
402
  for (int i = 0; i < framesToProcess; ++i) {
399
403
  float input = channelData[i];
@@ -406,11 +410,11 @@ std::shared_ptr<AudioBus> BiquadFilterNode::processNode(
406
410
  y2 = y1;
407
411
  y1 = output;
408
412
  }
413
+ x1_[c] = x1;
414
+ x2_[c] = x2;
415
+ y1_[c] = y1;
416
+ y2_[c] = y2;
409
417
  }
410
- x1_ = x1;
411
- x2_ = x2;
412
- y1_ = y1;
413
- y2_ = y2;
414
418
 
415
419
  return processingBus;
416
420
  }
@@ -80,11 +80,11 @@ class BiquadFilterNode : public AudioNode {
80
80
  std::shared_ptr<AudioParam> gainParam_;
81
81
  audioapi::BiquadFilterType type_;
82
82
 
83
- // delayed samples
84
- float x1_ = 0;
85
- float x2_ = 0;
86
- float y1_ = 0;
87
- float y2_ = 0;
83
+ // delayed samples, one per channel
84
+ std::vector<float> x1_;
85
+ std::vector<float> x2_;
86
+ std::vector<float> y1_;
87
+ std::vector<float> y2_;
88
88
 
89
89
  // coefficients
90
90
  float b0_ = 1.0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-audio-api",
3
- "version": "0.11.0-nightly-c0ffb48-20251211",
3
+ "version": "0.11.0-nightly-ca64ced-20251212",
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"
@@ -83,8 +83,7 @@
83
83
  },
84
84
  "peerDependencies": {
85
85
  "react": "*",
86
- "react-native": "*",
87
- "react-native-worklets": "*"
86
+ "react-native": "*"
88
87
  },
89
88
  "devDependencies": {
90
89
  "@babel/cli": "^7.20.0",