react-native-audio-api 0.11.4 → 0.11.5

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.
@@ -61,7 +61,8 @@ JSI_HOST_FUNCTION_IMPL(BiquadFilterNodeHostObject, getFrequencyResponse) {
61
61
  auto arrayBufferFrequency =
62
62
  args[0].getObject(runtime).getPropertyAsObject(runtime, "buffer").getArrayBuffer(runtime);
63
63
  auto frequencyArray = reinterpret_cast<float *>(arrayBufferFrequency.data(runtime));
64
- auto length = static_cast<size_t>(arrayBufferFrequency.size(runtime));
64
+ // arrayBufferFrequency is Float32Array from JS and size is in bytes thus hardcoded division by 4
65
+ auto length = static_cast<size_t>(arrayBufferFrequency.size(runtime) / 4);
65
66
 
66
67
  auto arrayBufferMag =
67
68
  args[1].getObject(runtime).getPropertyAsObject(runtime, "buffer").getArrayBuffer(runtime);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-audio-api",
3
- "version": "0.11.4",
3
+ "version": "0.11.5",
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"