react-native-audio-api 0.4.12-beta.3 → 0.4.12-beta.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.
- package/RNAudioAPI.podspec +5 -23
- package/lib/module/api.js +31 -0
- package/lib/module/api.js.map +1 -0
- package/lib/module/{index.web.js → api.web.js} +3 -1
- package/lib/module/api.web.js.map +1 -0
- package/lib/module/index.js +1 -28
- package/lib/module/index.js.map +1 -1
- package/lib/module/web-core/AudioBuffer.js +1 -1
- package/lib/module/web-core/AudioBuffer.js.map +1 -1
- package/lib/module/web-core/AudioContext.js +7 -0
- package/lib/module/web-core/AudioContext.js.map +1 -1
- package/lib/module/web-core/StretcherNode.js +64 -0
- package/lib/module/web-core/StretcherNode.js.map +1 -0
- package/lib/module/web-core/custom/LoadCustomWasm.js +33 -0
- package/lib/module/web-core/custom/LoadCustomWasm.js.map +1 -0
- package/lib/module/web-core/custom/index.js +4 -0
- package/lib/module/web-core/custom/index.js.map +1 -0
- package/lib/module/web-core/custom/signalsmithStretch/LICENSE.txt +21 -0
- package/lib/module/web-core/custom/signalsmithStretch/README.md +46 -0
- package/lib/module/web-core/custom/signalsmithStretch/SignalsmithStretch.js +822 -0
- package/lib/module/web-core/custom/signalsmithStretch/SignalsmithStretch.js.map +1 -0
- package/lib/module/web-core/custom/signalsmithStretch/SignalsmithStretch.mjs +826 -0
- package/lib/module/web-core/custom/signalsmithStretch/SignalsmithStretch.mjs.map +1 -0
- package/lib/typescript/api.d.ts +21 -0
- package/lib/typescript/api.d.ts.map +1 -0
- package/lib/typescript/{index.web.d.ts → api.web.d.ts} +3 -1
- package/lib/typescript/api.web.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -20
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/web-core/AudioBuffer.d.ts +1 -1
- package/lib/typescript/web-core/AudioBuffer.d.ts.map +1 -1
- package/lib/typescript/web-core/AudioContext.d.ts +2 -0
- package/lib/typescript/web-core/AudioContext.d.ts.map +1 -1
- package/lib/typescript/web-core/StretcherNode.d.ts +45 -0
- package/lib/typescript/web-core/StretcherNode.d.ts.map +1 -0
- package/lib/typescript/web-core/custom/LoadCustomWasm.d.ts +5 -0
- package/lib/typescript/web-core/custom/LoadCustomWasm.d.ts.map +1 -0
- package/lib/typescript/web-core/custom/index.d.ts +2 -0
- package/lib/typescript/web-core/custom/index.d.ts.map +1 -0
- package/package.json +8 -4
- package/scripts/setup-custom-wasm.js +104 -0
- package/src/api.ts +51 -0
- package/src/{index.web.ts → api.web.ts} +3 -0
- package/src/index.ts +1 -51
- package/src/web-core/AudioBuffer.tsx +2 -2
- package/src/web-core/AudioContext.tsx +11 -0
- package/src/web-core/StretcherNode.tsx +125 -0
- package/src/web-core/custom/LoadCustomWasm.ts +39 -0
- package/src/web-core/custom/index.ts +1 -0
- package/src/web-core/custom/signalsmithStretch/LICENSE.txt +21 -0
- package/src/web-core/custom/signalsmithStretch/README.md +46 -0
- package/src/web-core/custom/signalsmithStretch/SignalsmithStretch.js +945 -0
- package/src/web-core/custom/signalsmithStretch/SignalsmithStretch.mjs +949 -0
- package/lib/module/index.web.js.map +0 -1
- package/lib/typescript/index.web.d.ts.map +0 -1
- package/scripts/audioapi_utils.rb +0 -56
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["default","AudioBuffer","AudioBufferSourceNode","AudioContext","AudioDestinationNode","AudioNode","AnalyserNode","AudioParam","AudioScheduledSourceNode","BaseAudioContext","BiquadFilterNode","GainNode","OscillatorNode","StereoPannerNode","OscillatorType","BiquadFilterType","ChannelCountMode","ChannelInterpretation","ContextState","WindowType","PeriodicWaveConstraints","IndexSizeError","InvalidAccessError","InvalidStateError","RangeError","NotSupportedError"],"sourceRoot":"../../src","sources":["index.web.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,WAAW,QAAQ,2BAAwB;AAC/D,SAASD,OAAO,IAAIE,qBAAqB,QAAQ,qCAAkC;AACnF,SAASF,O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AO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,UAAU,EACV,uBAAuB,GACxB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,GAClB,MAAM,UAAU,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
def try_to_parse_react_native_package_json(node_modules_dir)
|
|
2
|
-
react_native_package_json_path = File.join(node_modules_dir, 'react-native/package.json')
|
|
3
|
-
if !File.exist?(react_native_package_json_path)
|
|
4
|
-
return nil
|
|
5
|
-
end
|
|
6
|
-
return JSON.parse(File.read(react_native_package_json_path))
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def find_config()
|
|
10
|
-
result = {
|
|
11
|
-
:react_native_version => nil,
|
|
12
|
-
:react_native_minor_version => nil,
|
|
13
|
-
:react_native_node_modules_dir => nil,
|
|
14
|
-
:react_native_common_dir => nil,
|
|
15
|
-
:react_native_audioapi_dir_from_pods_root => nil,
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
react_native_node_modules_dir = File.join(File.dirname(`cd "#{Pod::Config.instance.installation_root.to_s}" && node --print "require.resolve('react-native/package.json')"`), '..')
|
|
19
|
-
react_native_json = try_to_parse_react_native_package_json(react_native_node_modules_dir)
|
|
20
|
-
|
|
21
|
-
if react_native_json == nil
|
|
22
|
-
# user configuration, just in case
|
|
23
|
-
node_modules_dir = ENV["REACT_NATIVE_NODE_MODULES_DIR"]
|
|
24
|
-
react_native_json = try_to_parse_react_native_package_json(node_modules_dir)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
if react_native_json == nil
|
|
28
|
-
raise '[Audio API] Unable to recognize your `react-native` version. Please set environmental variable with `react-native` location: `export REACT_NATIVE_NODE_MODULES_DIR="<path to react-native>" && pod install`.'
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
result[:react_native_version] = react_native_json['version']
|
|
32
|
-
result[:react_native_minor_version] = react_native_json['version'].split('.')[1].to_i
|
|
33
|
-
if result[:react_native_minor_version] == 0 # nightly
|
|
34
|
-
result[:react_native_minor_version] = 1000
|
|
35
|
-
end
|
|
36
|
-
result[:react_native_node_modules_dir] = File.expand_path(react_native_node_modules_dir)
|
|
37
|
-
|
|
38
|
-
pods_root = Pod::Config.instance.project_pods_root
|
|
39
|
-
react_native_common_dir_absolute = File.join(react_native_node_modules_dir, 'react-native', 'ReactCommon')
|
|
40
|
-
react_native_common_dir_relative = Pathname.new(react_native_common_dir_absolute).relative_path_from(pods_root).to_s
|
|
41
|
-
result[:react_native_common_dir] = react_native_common_dir_relative
|
|
42
|
-
|
|
43
|
-
react_native_audioapi_dir_absolute = File.join(__dir__, '..')
|
|
44
|
-
react_native_audioapi_dir_relative = Pathname.new(react_native_audioapi_dir_absolute).relative_path_from(pods_root).to_s
|
|
45
|
-
result[:react_native_audioapi_dir_from_pods_root] = react_native_audioapi_dir_relative
|
|
46
|
-
|
|
47
|
-
return result
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def assert_minimal_react_native_version(config)
|
|
51
|
-
# If you change the minimal React Native version remember to update Compatibility Table in docs
|
|
52
|
-
minimalReactNativeVersion = 75
|
|
53
|
-
if config[:react_native_minor_version] < minimalReactNativeVersion
|
|
54
|
-
raise "[Audio API] Unsupported React Native version. Please use #{minimalReactNativeVersion} or newer."
|
|
55
|
-
end
|
|
56
|
-
end
|