react-native-audio-api 0.8.1-nightly-fc8149e-20250904 → 0.8.2

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.
Files changed (24) hide show
  1. package/android/src/main/cpp/audioapi/android/core/AudioDecoder.cpp +4 -3
  2. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/libavcodec +0 -0
  3. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/libavcodec +0 -0
  4. package/common/cpp/audioapi/external/libavformat.xcframework/Info.plist +5 -5
  5. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/libavformat +0 -0
  6. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/libavformat +0 -0
  7. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/libavutil +0 -0
  8. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/libavutil +0 -0
  9. package/common/cpp/audioapi/external/libswresample.xcframework/Info.plist +5 -5
  10. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/libswresample +0 -0
  11. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/libswresample +0 -0
  12. package/common/cpp/audioapi/libs/ffmpeg/FFmpegDecoding.cpp +4 -11
  13. package/common/cpp/audioapi/libs/ffmpeg/FFmpegDecoding.h +2 -2
  14. package/common/cpp/audioapi/libs/ffmpeg/create_xcframework.sh +2 -2
  15. package/common/cpp/audioapi/libs/ffmpeg/ffmpeg_setup.sh +2 -2
  16. package/ios/audioapi/ios/core/AudioDecoder.mm +2 -2
  17. package/lib/commonjs/web-core/custom/LoadCustomWasm.js +2 -2
  18. package/lib/commonjs/web-core/custom/LoadCustomWasm.js.map +1 -1
  19. package/lib/module/web-core/custom/LoadCustomWasm.js +2 -2
  20. package/lib/module/web-core/custom/LoadCustomWasm.js.map +1 -1
  21. package/lib/typescript/web-core/custom/LoadCustomWasm.d.ts +1 -1
  22. package/lib/typescript/web-core/custom/LoadCustomWasm.d.ts.map +1 -1
  23. package/package.json +1 -1
  24. package/src/web-core/custom/LoadCustomWasm.ts +2 -2
@@ -67,8 +67,8 @@ std::shared_ptr<AudioBus> AudioDecoder::decodeWithFilePath(
67
67
  #ifndef AUDIO_API_TEST_SUITE
68
68
  std::vector<int16_t> buffer;
69
69
  if (AudioDecoder::pathHasExtension(path, {".mp4", ".m4a", ".aac"})) {
70
- buffer =
71
- ffmpegdecoding::decodeWithFilePath(path, static_cast<int>(sampleRate_));
70
+ buffer = ffmpegdecoding::decodeWithFilePath(
71
+ path, numChannels_, static_cast<int>(sampleRate_));
72
72
  if (buffer.empty()) {
73
73
  __android_log_print(
74
74
  ANDROID_LOG_ERROR,
@@ -122,7 +122,8 @@ std::shared_ptr<AudioBus> AudioDecoder::decodeWithMemoryBlock(
122
122
  const AudioFormat format = AudioDecoder::detectAudioFormat(data, size);
123
123
  if (format == AudioFormat::MP4 || format == AudioFormat::M4A ||
124
124
  format == AudioFormat::AAC) {
125
- buffer = ffmpegdecoding::decodeWithMemoryBlock(data, size, sampleRate_);
125
+ buffer = ffmpegdecoding::decodeWithMemoryBlock(
126
+ data, size, numChannels_, sampleRate_);
126
127
  if (buffer.empty()) {
127
128
  __android_log_print(
128
129
  ANDROID_LOG_ERROR, "AudioDecoder", "Failed to decode with FFmpeg");
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libavformat.framework/libavformat</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64_x86_64-simulator</string>
11
+ <string>ios-arm64</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>libavformat.framework</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
- <string>x86_64</string>
18
17
  </array>
19
18
  <key>SupportedPlatform</key>
20
19
  <string>ios</string>
21
- <key>SupportedPlatformVariant</key>
22
- <string>simulator</string>
23
20
  </dict>
24
21
  <dict>
25
22
  <key>BinaryPath</key>
26
23
  <string>libavformat.framework/libavformat</string>
27
24
  <key>LibraryIdentifier</key>
28
- <string>ios-arm64</string>
25
+ <string>ios-arm64_x86_64-simulator</string>
29
26
  <key>LibraryPath</key>
30
27
  <string>libavformat.framework</string>
31
28
  <key>SupportedArchitectures</key>
32
29
  <array>
33
30
  <string>arm64</string>
31
+ <string>x86_64</string>
34
32
  </array>
35
33
  <key>SupportedPlatform</key>
36
34
  <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libswresample.framework/libswresample</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64</string>
11
+ <string>ios-arm64_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>libswresample.framework</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
+ <string>x86_64</string>
17
18
  </array>
18
19
  <key>SupportedPlatform</key>
19
20
  <string>ios</string>
21
+ <key>SupportedPlatformVariant</key>
22
+ <string>simulator</string>
20
23
  </dict>
21
24
  <dict>
22
25
  <key>BinaryPath</key>
23
26
  <string>libswresample.framework/libswresample</string>
24
27
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_x86_64-simulator</string>
28
+ <string>ios-arm64</string>
26
29
  <key>LibraryPath</key>
27
30
  <string>libswresample.framework</string>
28
31
  <key>SupportedArchitectures</key>
29
32
  <array>
30
33
  <string>arm64</string>
31
- <string>x86_64</string>
32
34
  </array>
33
35
  <key>SupportedPlatform</key>
34
36
  <string>ios</string>
35
- <key>SupportedPlatformVariant</key>
36
- <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>
@@ -218,7 +218,7 @@ std::vector<int16_t> readAllPcmFrames(
218
218
  return buffer;
219
219
  }
220
220
 
221
- std::vector<int16_t> decodeWithMemoryBlock(const void *data, size_t size, int sample_rate) {
221
+ std::vector<int16_t> decodeWithMemoryBlock(const void *data, size_t size, const int channel_count, int sample_rate) {
222
222
  if (data == nullptr || size == 0) {
223
223
  return {};
224
224
  }
@@ -325,7 +325,7 @@ std::vector<int16_t> decodeWithMemoryBlock(const void *data, size_t size, int sa
325
325
  // Decode all frames
326
326
  size_t framesRead = 0;
327
327
  std::vector<int16_t> decoded_buffer = readAllPcmFrames(
328
- fmt_ctx, codec_ctx, sample_rate, audio_stream_index, actual_channels, framesRead);
328
+ fmt_ctx, codec_ctx, sample_rate, audio_stream_index, channel_count, framesRead);
329
329
 
330
330
  // Cleanup - Note: avio_context_free will free the io_buffer
331
331
  avcodec_free_context(&codec_ctx);
@@ -339,7 +339,7 @@ std::vector<int16_t> decodeWithMemoryBlock(const void *data, size_t size, int sa
339
339
  return decoded_buffer;
340
340
  }
341
341
 
342
- std::vector<int16_t> decodeWithFilePath(const std::string &path, int sample_rate) {
342
+ std::vector<int16_t> decodeWithFilePath(const std::string &path, const int channel_count, int sample_rate) {
343
343
  if (path.empty()) {
344
344
  return {};
345
345
  }
@@ -388,16 +388,9 @@ std::vector<int16_t> decodeWithFilePath(const std::string &path, int sample_rate
388
388
  return {};
389
389
  }
390
390
 
391
- int actual_channels = codec_ctx->ch_layout.nb_channels;
392
- if (actual_channels <= 0 || actual_channels > 8) {
393
- avcodec_free_context(&codec_ctx);
394
- avformat_close_input(&fmt_ctx);
395
- return {};
396
- }
397
-
398
391
  size_t framesRead = 0;
399
392
  std::vector<int16_t> decoded_buffer = readAllPcmFrames(
400
- fmt_ctx, codec_ctx, sample_rate, audio_stream_index, actual_channels, framesRead);
393
+ fmt_ctx, codec_ctx, sample_rate, audio_stream_index, channel_count, framesRead);
401
394
 
402
395
  avcodec_free_context(&codec_ctx);
403
396
  avformat_close_input(&fmt_ctx);
@@ -31,7 +31,7 @@ struct MemoryIOContext {
31
31
  int read_packet(void *opaque, uint8_t *buf, int buf_size);
32
32
  int64_t seek_packet(void *opaque, int64_t offset, int whence);
33
33
  std::vector<int16_t> readAllPcmFrames(AVFormatContext *fmt_ctx, AVCodecContext *codec_ctx, int out_sample_rate, int audio_stream_index, int channels, size_t &framesRead);
34
- std::vector<int16_t> decodeWithMemoryBlock(const void *data, size_t size, int sample_rate);
35
- std::vector<int16_t> decodeWithFilePath(const std::string &path, int sample_rate);
34
+ std::vector<int16_t> decodeWithMemoryBlock(const void *data, size_t size, const int channel_count, int sample_rate);
35
+ std::vector<int16_t> decodeWithFilePath(const std::string &path, const int channel_count, int sample_rate);
36
36
 
37
37
  } // namespace audioapi::ffmpegdecoder
@@ -62,7 +62,7 @@ create_framework() {
62
62
  # Change the shared library identification name, removing version number and 'dylib' extension;
63
63
  # \c Frameworks part of the name is needed since this is where frameworks will be installed in
64
64
  # an application bundle:
65
- install_name_tool -id @rpath/Frameworks/${framework_name}.framework/${framework_name} "${framework_complete_path}"
65
+ install_name_tool -id @rpath/${framework_name}.framework/${framework_name} "${framework_complete_path}"
66
66
 
67
67
  # Add Info.plist file into the framework directory:
68
68
  build_info_plist "${ffmpeg_library_path}/framework/${framework_name}.framework/Info.plist" "${framework_name}" "io.qt.ffmpegkit."${framework_name}
@@ -71,7 +71,7 @@ create_framework() {
71
71
  if [ "$found_name" != "$framework_name" ]
72
72
  then
73
73
  # Change the dependent shared library install name to remove version number and 'dylib' extension:
74
- install_name_tool -change "$dependency_path" @rpath/Frameworks/${found_name}.framework/${found_name} "${framework_complete_path}"
74
+ install_name_tool -change "$dependency_path" @rpath/${found_name}.framework/${found_name} "${framework_complete_path}"
75
75
  fi
76
76
  done
77
77
  }
@@ -136,7 +136,7 @@ fix_dynamic_ios_linkage() {
136
136
  if [[ -n "$dep" ]]; then
137
137
  # Extract library name without any version numbers and extension for framework path
138
138
  local lib_name=$(basename "$dep" | sed 's/\.dylib$//' | sed 's/\.[0-9][0-9.]*$//')
139
- local framework_path="@rpath/Frameworks/${lib_name}.framework/${lib_name}"
139
+ local framework_path="@rpath/${lib_name}.framework/${lib_name}"
140
140
  echo "Changing dependency: $dep -> $framework_path"
141
141
  install_name_tool -change "$dep" "$framework_path" "${LIB_PATH}"
142
142
  fi
@@ -144,7 +144,7 @@ fix_dynamic_ios_linkage() {
144
144
 
145
145
  # Also update the library's own install name to use @rpath with framework structure
146
146
  local lib_name=$(basename "${LIB_PATH}" | sed 's/\.dylib$//' | sed 's/\.[0-9][0-9.]*$//')
147
- local framework_path="@rpath/Frameworks/${lib_name}.framework/${lib_name}"
147
+ local framework_path="@rpath/${lib_name}.framework/${lib_name}"
148
148
  echo "Updating install name for $(basename "${LIB_PATH}") -> $framework_path"
149
149
  install_name_tool -id "$framework_path" "${LIB_PATH}"
150
150
  }
@@ -56,7 +56,7 @@ std::shared_ptr<AudioBus> AudioDecoder::decodeWithFilePath(const std::string &pa
56
56
  {
57
57
  std::vector<int16_t> buffer;
58
58
  if (AudioDecoder::pathHasExtension(path, {".mp4", ".m4a", ".aac"})) {
59
- buffer = ffmpegdecoding::decodeWithFilePath(path, static_cast<int>(sampleRate_));
59
+ buffer = ffmpegdecoding::decodeWithFilePath(path, numChannels_, static_cast<int>(sampleRate_));
60
60
  if (buffer.empty()) {
61
61
  NSLog(@"Failed to decode with FFmpeg: %s", path.c_str());
62
62
  return nullptr;
@@ -93,7 +93,7 @@ std::shared_ptr<AudioBus> AudioDecoder::decodeWithMemoryBlock(const void *data,
93
93
  std::vector<int16_t> buffer;
94
94
  const AudioFormat format = AudioDecoder::detectAudioFormat(data, size);
95
95
  if (format == AudioFormat::MP4 || format == AudioFormat::M4A || format == AudioFormat::AAC) {
96
- buffer = ffmpegdecoding::decodeWithMemoryBlock(data, size, static_cast<int>(sampleRate_));
96
+ buffer = ffmpegdecoding::decodeWithMemoryBlock(data, size, numChannels_, static_cast<int>(sampleRate_));
97
97
  if (buffer.empty()) {
98
98
  NSLog(@"Failed to decode with FFmpeg");
99
99
  return nullptr;
@@ -7,7 +7,7 @@ exports.globalWasmPromise = exports.globalTag = exports.default = void 0;
7
7
  const globalTag = exports.globalTag = '__rnaaCstStretch';
8
8
  const eventTitle = 'rnaaCstStretchLoaded';
9
9
  let globalWasmPromise = exports.globalWasmPromise = null;
10
- const LoadCustomWasm = async () => {
10
+ const LoadCustomWasm = async (pathPrefix = '') => {
11
11
  if (typeof window === 'undefined') {
12
12
  return null;
13
13
  }
@@ -19,7 +19,7 @@ const LoadCustomWasm = async () => {
19
19
  document.head.appendChild(loadScript);
20
20
  loadScript.type = 'module';
21
21
  loadScript.textContent = `
22
- import SignalsmithStretch from '/signalsmithStretch.mjs';
22
+ import SignalsmithStretch from '${pathPrefix}/signalsmithStretch.mjs';
23
23
  window.${globalTag} = SignalsmithStretch;
24
24
  window.postMessage('${eventTitle}');
25
25
  `;
@@ -1 +1 @@
1
- {"version":3,"names":["globalTag","exports","eventTitle","globalWasmPromise","LoadCustomWasm","window","Promise","resolve","loadScript","document","createElement","head","appendChild","type","textContent","onScriptLoaded","event","data","removeEventListener","addEventListener","_default","default"],"sourceRoot":"../../../../src","sources":["web-core/custom/LoadCustomWasm.ts"],"mappings":";;;;;;AAAO,MAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,kBAAkB;AAC3C,MAAME,UAAU,GAAG,sBAAsB;AAElC,IAAIC,iBAAuC,GAAAF,OAAA,CAAAE,iBAAA,GAAG,IAAI;AAEzD,MAAMC,cAAc,GAAG,MAAAA,CAAA,KAAY;EACjC,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,OAAO,IAAI;EACb;EAEA,IAAIF,iBAAiB,EAAE;IACrB,OAAOA,iBAAiB;EAC1B;EAEAF,OAAA,CAAAE,iBAAA,GAAAA,iBAAiB,GAAG,IAAIG,OAAO,CAAQC,OAAO,IAAK;IACjD,MAAMC,UAAU,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IACnDD,QAAQ,CAACE,IAAI,CAACC,WAAW,CAACJ,UAAU,CAAC;IACrCA,UAAU,CAACK,IAAI,GAAG,QAAQ;IAE1BL,UAAU,CAACM,WAAW,GAAG;AAC7B;AACA,eAAed,SAAS;AACxB,4BAA4BE,UAAU;AACtC,KAAK;IAED,SAASa,cAAcA,CAACC,KAA2B,EAAE;MACnD,IAAIA,KAAK,CAACC,IAAI,KAAKf,UAAU,EAAE;QAC7B;MACF;MAEAK,OAAO,CAAC,CAAC;MACTF,MAAM,CAACa,mBAAmB,CAAC,SAAS,EAAEH,cAAc,CAAC;IACvD;IAEAV,MAAM,CAACc,gBAAgB,CAAC,SAAS,EAAEJ,cAAc,CAAC;EACpD,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAK,QAAA,GAAAnB,OAAA,CAAAoB,OAAA,GAEajB,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["globalTag","exports","eventTitle","globalWasmPromise","LoadCustomWasm","pathPrefix","window","Promise","resolve","loadScript","document","createElement","head","appendChild","type","textContent","onScriptLoaded","event","data","removeEventListener","addEventListener","_default","default"],"sourceRoot":"../../../../src","sources":["web-core/custom/LoadCustomWasm.ts"],"mappings":";;;;;;AAAO,MAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,kBAAkB;AAC3C,MAAME,UAAU,GAAG,sBAAsB;AAElC,IAAIC,iBAAuC,GAAAF,OAAA,CAAAE,iBAAA,GAAG,IAAI;AAEzD,MAAMC,cAAc,GAAG,MAAAA,CAAOC,UAAkB,GAAG,EAAE,KAAK;EACxD,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,OAAO,IAAI;EACb;EAEA,IAAIH,iBAAiB,EAAE;IACrB,OAAOA,iBAAiB;EAC1B;EAEAF,OAAA,CAAAE,iBAAA,GAAAA,iBAAiB,GAAG,IAAII,OAAO,CAAQC,OAAO,IAAK;IACjD,MAAMC,UAAU,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IACnDD,QAAQ,CAACE,IAAI,CAACC,WAAW,CAACJ,UAAU,CAAC;IACrCA,UAAU,CAACK,IAAI,GAAG,QAAQ;IAE1BL,UAAU,CAACM,WAAW,GAAG;AAC7B,wCAAwCV,UAAU;AAClD,eAAeL,SAAS;AACxB,4BAA4BE,UAAU;AACtC,KAAK;IAED,SAASc,cAAcA,CAACC,KAA2B,EAAE;MACnD,IAAIA,KAAK,CAACC,IAAI,KAAKhB,UAAU,EAAE;QAC7B;MACF;MAEAM,OAAO,CAAC,CAAC;MACTF,MAAM,CAACa,mBAAmB,CAAC,SAAS,EAAEH,cAAc,CAAC;IACvD;IAEAV,MAAM,CAACc,gBAAgB,CAAC,SAAS,EAAEJ,cAAc,CAAC;EACpD,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAK,QAAA,GAAApB,OAAA,CAAAqB,OAAA,GAEalB,cAAc","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  export const globalTag = '__rnaaCstStretch';
4
4
  const eventTitle = 'rnaaCstStretchLoaded';
5
5
  export let globalWasmPromise = null;
6
- const LoadCustomWasm = async () => {
6
+ const LoadCustomWasm = async (pathPrefix = '') => {
7
7
  if (typeof window === 'undefined') {
8
8
  return null;
9
9
  }
@@ -15,7 +15,7 @@ const LoadCustomWasm = async () => {
15
15
  document.head.appendChild(loadScript);
16
16
  loadScript.type = 'module';
17
17
  loadScript.textContent = `
18
- import SignalsmithStretch from '/signalsmithStretch.mjs';
18
+ import SignalsmithStretch from '${pathPrefix}/signalsmithStretch.mjs';
19
19
  window.${globalTag} = SignalsmithStretch;
20
20
  window.postMessage('${eventTitle}');
21
21
  `;
@@ -1 +1 @@
1
- {"version":3,"names":["globalTag","eventTitle","globalWasmPromise","LoadCustomWasm","window","Promise","resolve","loadScript","document","createElement","head","appendChild","type","textContent","onScriptLoaded","event","data","removeEventListener","addEventListener"],"sourceRoot":"../../../../src","sources":["web-core/custom/LoadCustomWasm.ts"],"mappings":";;AAAA,OAAO,MAAMA,SAAS,GAAG,kBAAkB;AAC3C,MAAMC,UAAU,GAAG,sBAAsB;AAEzC,OAAO,IAAIC,iBAAuC,GAAG,IAAI;AAEzD,MAAMC,cAAc,GAAG,MAAAA,CAAA,KAAY;EACjC,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,OAAO,IAAI;EACb;EAEA,IAAIF,iBAAiB,EAAE;IACrB,OAAOA,iBAAiB;EAC1B;EAEAA,iBAAiB,GAAG,IAAIG,OAAO,CAAQC,OAAO,IAAK;IACjD,MAAMC,UAAU,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IACnDD,QAAQ,CAACE,IAAI,CAACC,WAAW,CAACJ,UAAU,CAAC;IACrCA,UAAU,CAACK,IAAI,GAAG,QAAQ;IAE1BL,UAAU,CAACM,WAAW,GAAG;AAC7B;AACA,eAAeb,SAAS;AACxB,4BAA4BC,UAAU;AACtC,KAAK;IAED,SAASa,cAAcA,CAACC,KAA2B,EAAE;MACnD,IAAIA,KAAK,CAACC,IAAI,KAAKf,UAAU,EAAE;QAC7B;MACF;MAEAK,OAAO,CAAC,CAAC;MACTF,MAAM,CAACa,mBAAmB,CAAC,SAAS,EAAEH,cAAc,CAAC;IACvD;IAEAV,MAAM,CAACc,gBAAgB,CAAC,SAAS,EAAEJ,cAAc,CAAC;EACpD,CAAC,CAAC;AACJ,CAAC;AAED,eAAeX,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["globalTag","eventTitle","globalWasmPromise","LoadCustomWasm","pathPrefix","window","Promise","resolve","loadScript","document","createElement","head","appendChild","type","textContent","onScriptLoaded","event","data","removeEventListener","addEventListener"],"sourceRoot":"../../../../src","sources":["web-core/custom/LoadCustomWasm.ts"],"mappings":";;AAAA,OAAO,MAAMA,SAAS,GAAG,kBAAkB;AAC3C,MAAMC,UAAU,GAAG,sBAAsB;AAEzC,OAAO,IAAIC,iBAAuC,GAAG,IAAI;AAEzD,MAAMC,cAAc,GAAG,MAAAA,CAAOC,UAAkB,GAAG,EAAE,KAAK;EACxD,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,OAAO,IAAI;EACb;EAEA,IAAIH,iBAAiB,EAAE;IACrB,OAAOA,iBAAiB;EAC1B;EAEAA,iBAAiB,GAAG,IAAII,OAAO,CAAQC,OAAO,IAAK;IACjD,MAAMC,UAAU,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IACnDD,QAAQ,CAACE,IAAI,CAACC,WAAW,CAACJ,UAAU,CAAC;IACrCA,UAAU,CAACK,IAAI,GAAG,QAAQ;IAE1BL,UAAU,CAACM,WAAW,GAAG;AAC7B,wCAAwCV,UAAU;AAClD,eAAeJ,SAAS;AACxB,4BAA4BC,UAAU;AACtC,KAAK;IAED,SAASc,cAAcA,CAACC,KAA2B,EAAE;MACnD,IAAIA,KAAK,CAACC,IAAI,KAAKhB,UAAU,EAAE;QAC7B;MACF;MAEAM,OAAO,CAAC,CAAC;MACTF,MAAM,CAACa,mBAAmB,CAAC,SAAS,EAAEH,cAAc,CAAC;IACvD;IAEAV,MAAM,CAACc,gBAAgB,CAAC,SAAS,EAAEJ,cAAc,CAAC;EACpD,CAAC,CAAC;AACJ,CAAC;AAED,eAAeZ,cAAc","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  export declare const globalTag = "__rnaaCstStretch";
2
2
  export declare let globalWasmPromise: Promise<void> | null;
3
- declare const LoadCustomWasm: () => Promise<void | null>;
3
+ declare const LoadCustomWasm: (pathPrefix?: string) => Promise<void | null>;
4
4
  export default LoadCustomWasm;
5
5
  //# sourceMappingURL=LoadCustomWasm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadCustomWasm.d.ts","sourceRoot":"","sources":["../../../../src/web-core/custom/LoadCustomWasm.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAG5C,eAAO,IAAI,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAW,CAAC;AAE1D,QAAA,MAAM,cAAc,4BA+BnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"LoadCustomWasm.d.ts","sourceRoot":"","sources":["../../../../src/web-core/custom/LoadCustomWasm.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,qBAAqB,CAAC;AAG5C,eAAO,IAAI,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAW,CAAC;AAE1D,QAAA,MAAM,cAAc,GAAU,aAAY,MAAW,yBA+BpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-audio-api",
3
- "version": "0.8.1-nightly-fc8149e-20250904",
3
+ "version": "0.8.2",
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"
@@ -3,7 +3,7 @@ const eventTitle = 'rnaaCstStretchLoaded';
3
3
 
4
4
  export let globalWasmPromise: Promise<void> | null = null;
5
5
 
6
- const LoadCustomWasm = async () => {
6
+ const LoadCustomWasm = async (pathPrefix: string = '') => {
7
7
  if (typeof window === 'undefined') {
8
8
  return null;
9
9
  }
@@ -18,7 +18,7 @@ const LoadCustomWasm = async () => {
18
18
  loadScript.type = 'module';
19
19
 
20
20
  loadScript.textContent = `
21
- import SignalsmithStretch from '/signalsmithStretch.mjs';
21
+ import SignalsmithStretch from '${pathPrefix}/signalsmithStretch.mjs';
22
22
  window.${globalTag} = SignalsmithStretch;
23
23
  window.postMessage('${eventTitle}');
24
24
  `;