gravix-rtc-react-native 0.0.0-stage → 0.2.0
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/CHANGELOG.md +134 -0
- package/LICENSE +20 -0
- package/LICENSES/Apache-2.0.txt +175 -0
- package/NOTICE +68 -0
- package/README.md +313 -2
- package/android/build.gradle +137 -0
- package/android/consumer-rules.pro +29 -0
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/cpp/CMakeLists.txt +48 -0
- package/android/src/main/cpp/gx_dfn_engine.c +332 -0
- package/android/src/main/cpp/gx_fx_jni.cpp +34 -0
- package/android/src/main/cpp/gx_ns_jni.c +162 -0
- package/android/src/main/cpp/third_party/onnxruntime/LICENSE +21 -0
- package/android/src/main/cpp/third_party/onnxruntime/include/onnxruntime_c_api.h +9227 -0
- package/android/src/main/cpp/third_party/onnxruntime/include/onnxruntime_ep_c_api.h +3315 -0
- package/android/src/main/cpp/third_party/onnxruntime/include/onnxruntime_error_code.h +98 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixAudioHooks.kt +144 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixAudioModule.kt +105 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixNativeAudio.kt +310 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixRtc.kt +134 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixRtcModule.kt +176 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/GravixRtcPackage.kt +39 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/audio/AudioDeviceKind.java +44 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/audio/AudioManagerUtils.kt +120 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/audio/AudioSwitchManager.java +270 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/audio/AudioType.kt +50 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicCaptureRouter.kt +375 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicDecoder.kt +339 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicInterruptionWatcher.kt +82 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicMicRelease.kt +117 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicMixKernel.kt +191 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/music/MusicMixerEngine.kt +617 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/AudioRoutePolicy.kt +137 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GravixCaptureProcessing.kt +67 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxCaptureDump.kt +143 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxCaptureSwitcher.kt +196 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxNoiseProcessor.kt +795 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxNsLogic.kt +180 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxNsNative.kt +83 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxNsStudio.kt +372 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxRecordStartGuard.kt +76 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxRecorderSeam.kt +434 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxSingerSource.kt +37 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/GxVoiceFx.kt +160 -0
- package/android/src/main/java/com/gravitycompile/gravixrtc/processing/OtherAppAudioPolicy.kt +143 -0
- package/android/src/main/java/org/webrtc/audio/WebRtcAudioTrackHelper.kt +43 -0
- package/docs/ANDROID_NATIVE_HOOKS.md +102 -0
- package/docs/FEATURE_MATRIX.md +192 -0
- package/docs/IOS_NATIVE_HOOKS.md +190 -0
- package/gravix-rtc-react-native.podspec +49 -0
- package/ios/GravixRtc.h +7 -0
- package/ios/GravixRtc.mm +273 -0
- package/ios/GravixRtcSetup.h +29 -0
- package/ios/GravixRtcSetup.m +52 -0
- package/ios/audio/GravixRtcIosAudio.m +157 -0
- package/ios/audio/GxAudioDevice.h +62 -0
- package/ios/audio/GxAudioDevice.m +857 -0
- package/ios/audio/GxAudioSetup.h +34 -0
- package/ios/audio/GxAudioSetup.m +70 -0
- package/ios/audio/GxCompat.swift +53 -0
- package/ios/audio/GxIosAudio.swift +99 -0
- package/ios/audio/GxMusicController.swift +150 -0
- package/ios/audio/GxMusicPost.swift +362 -0
- package/ios/audio/GxNoiseProcessor.swift +718 -0
- package/ios/audio/GxNsDfn3CoreML.swift +195 -0
- package/ios/audio/GxNsStudioEngine.swift +237 -0
- package/ios/audio/GxNsStudioPack.swift +212 -0
- package/ios/audio/GxVoiceFx.swift +161 -0
- package/ios/audio/gx_adm_state.h +153 -0
- package/ios/gxcore/apple/gx_music_post.c +312 -0
- package/ios/gxcore/apple/gx_pcm.c +30 -0
- package/ios/gxcore/apple/gxns_build.h +19 -0
- package/ios/gxcore/apple/gxns_ios.c +17 -0
- package/ios/gxcore/apple/include/gx_fx.h +3 -0
- package/ios/gxcore/apple/include/gx_music_post.h +88 -0
- package/ios/gxcore/apple/include/gx_ns.h +3 -0
- package/ios/gxcore/apple/include/gx_pcm.h +33 -0
- package/ios/gxcore/apple/include/gxns_ios.h +18 -0
- package/ios/gxcore/apple/include/module.modulemap +10 -0
- package/ios/gxcore/apple/shim/rnnoise.h +2 -0
- package/ios/gxcore/apple/shim/speex_resampler.h +2 -0
- package/ios/gxcore/apple/units/gx_fx_forward.cpp +3 -0
- package/ios/gxcore/apple/units/gx_ns.c +7 -0
- package/ios/gxcore/apple/units/gx_ns_timer.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_celt_lpc.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_denoise.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_kiss_fft.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_pitch.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_rnn.c +7 -0
- package/ios/gxcore/apple/units/rnnoise_rnn_data.c +7 -0
- package/ios/gxcore/apple/units/speexdsp_resample.c +7 -0
- package/ios/resources/ns/DFN3-NOTICE.txt +10 -0
- package/ios/resources/ns/DeepFilterNet-LICENSE-APACHE +201 -0
- package/ios/resources/ns/DeepFilterNet-LICENSE-MIT +19 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/analytics/coremldata.bin +0 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/coremldata.bin +0 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/metadata.json +338 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/model.mil +927 -0
- package/ios/resources/ns/gxns_dfn3.mlmodelc/weights/weight.bin +0 -0
- package/lib/module/android/bindings.js +49 -0
- package/lib/module/android/bindings.js.map +1 -0
- package/lib/module/android/index.js +13 -0
- package/lib/module/android/index.js.map +1 -0
- package/lib/module/android/micMute.js +341 -0
- package/lib/module/android/micMute.js.map +1 -0
- package/lib/module/android/nativeAudio.js +47 -0
- package/lib/module/android/nativeAudio.js.map +1 -0
- package/lib/module/android/noiseSuppression.js +170 -0
- package/lib/module/android/noiseSuppression.js.map +1 -0
- package/lib/module/android/roomMusic.js +142 -0
- package/lib/module/android/roomMusic.js.map +1 -0
- package/lib/module/android/singerMode.js +31 -0
- package/lib/module/android/singerMode.js.map +1 -0
- package/lib/module/android/voiceEffects.js +65 -0
- package/lib/module/android/voiceEffects.js.map +1 -0
- package/lib/module/audio/AudioManager.js +79 -0
- package/lib/module/audio/AudioManager.js.map +1 -0
- package/lib/module/audio/AudioSession.js +90 -0
- package/lib/module/audio/AudioSession.js.map +1 -0
- package/lib/module/audio/remoteVolume.js +54 -0
- package/lib/module/audio/remoteVolume.js.map +1 -0
- package/lib/module/components/VideoView.js +109 -0
- package/lib/module/components/VideoView.js.map +1 -0
- package/lib/module/features/audioScenario.js +53 -0
- package/lib/module/features/audioScenario.js.map +1 -0
- package/lib/module/features/beauty.js +828 -0
- package/lib/module/features/beauty.js.map +1 -0
- package/lib/module/features/micRelease.js +89 -0
- package/lib/module/features/micRelease.js.map +1 -0
- package/lib/module/features/noiseSuppression.js +213 -0
- package/lib/module/features/noiseSuppression.js.map +1 -0
- package/lib/module/features/roomMusic.js +90 -0
- package/lib/module/features/roomMusic.js.map +1 -0
- package/lib/module/features/roomMusicAndroid.js +294 -0
- package/lib/module/features/roomMusicAndroid.js.map +1 -0
- package/lib/module/features/roomMusicIos.js +250 -0
- package/lib/module/features/roomMusicIos.js.map +1 -0
- package/lib/module/features/roomMusicTypes.js +53 -0
- package/lib/module/features/roomMusicTypes.js.map +1 -0
- package/lib/module/features/screenShare.js +22 -0
- package/lib/module/features/screenShare.js.map +1 -0
- package/lib/module/features/singerMode.js +73 -0
- package/lib/module/features/singerMode.js.map +1 -0
- package/lib/module/features/voiceEffects.js +148 -0
- package/lib/module/features/voiceEffects.js.map +1 -0
- package/lib/module/hooks/context.js +34 -0
- package/lib/module/hooks/context.js.map +1 -0
- package/lib/module/hooks/hooks.js +145 -0
- package/lib/module/hooks/hooks.js.map +1 -0
- package/lib/module/hooks/types.js +4 -0
- package/lib/module/hooks/types.js.map +1 -0
- package/lib/module/hooks/useRoomEvents.js +30 -0
- package/lib/module/hooks/useRoomEvents.js.map +1 -0
- package/lib/module/index.js +43 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/ios/autoAttach.js +14 -0
- package/lib/module/ios/autoAttach.js.map +1 -0
- package/lib/module/ios/iosAudio.js +149 -0
- package/lib/module/ios/iosAudio.js.map +1 -0
- package/lib/module/join/appStateLifecycle.js +54 -0
- package/lib/module/join/appStateLifecycle.js.map +1 -0
- package/lib/module/micPolicy.js +249 -0
- package/lib/module/micPolicy.js.map +1 -0
- package/lib/module/native/NativeGravixAudio.js +18 -0
- package/lib/module/native/NativeGravixAudio.js.map +1 -0
- package/lib/module/native/NativeGravixRtc.js +13 -0
- package/lib/module/native/NativeGravixRtc.js.map +1 -0
- package/lib/module/native/module.js +23 -0
- package/lib/module/native/module.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/polyfills/DOMException.js +22 -0
- package/lib/module/polyfills/DOMException.js.map +1 -0
- package/lib/module/polyfills/early.js +18 -0
- package/lib/module/polyfills/early.js.map +1 -0
- package/lib/module/polyfills/event.js +71 -0
- package/lib/module/polyfills/event.js.map +1 -0
- package/lib/module/polyfills/sha256.js +92 -0
- package/lib/module/polyfills/sha256.js.map +1 -0
- package/lib/module/polyfills/subtleHmac.js +91 -0
- package/lib/module/polyfills/subtleHmac.js.map +1 -0
- package/lib/module/polyfills/textCoding.js +164 -0
- package/lib/module/polyfills/textCoding.js.map +1 -0
- package/lib/module/registerGlobals.js +135 -0
- package/lib/module/registerGlobals.js.map +1 -0
- package/lib/module/unsupported.js +90 -0
- package/lib/module/unsupported.js.map +1 -0
- package/lib/module/version.js +7 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/android/bindings.d.ts +14 -0
- package/lib/typescript/src/android/bindings.d.ts.map +1 -0
- package/lib/typescript/src/android/index.d.ts +9 -0
- package/lib/typescript/src/android/index.d.ts.map +1 -0
- package/lib/typescript/src/android/micMute.d.ts +124 -0
- package/lib/typescript/src/android/micMute.d.ts.map +1 -0
- package/lib/typescript/src/android/nativeAudio.d.ts +40 -0
- package/lib/typescript/src/android/nativeAudio.d.ts.map +1 -0
- package/lib/typescript/src/android/noiseSuppression.d.ts +48 -0
- package/lib/typescript/src/android/noiseSuppression.d.ts.map +1 -0
- package/lib/typescript/src/android/roomMusic.d.ts +80 -0
- package/lib/typescript/src/android/roomMusic.d.ts.map +1 -0
- package/lib/typescript/src/android/singerMode.d.ts +27 -0
- package/lib/typescript/src/android/singerMode.d.ts.map +1 -0
- package/lib/typescript/src/android/voiceEffects.d.ts +30 -0
- package/lib/typescript/src/android/voiceEffects.d.ts.map +1 -0
- package/lib/typescript/src/audio/AudioManager.d.ts +32 -0
- package/lib/typescript/src/audio/AudioManager.d.ts.map +1 -0
- package/lib/typescript/src/audio/AudioSession.d.ts +70 -0
- package/lib/typescript/src/audio/AudioSession.d.ts.map +1 -0
- package/lib/typescript/src/audio/remoteVolume.d.ts +8 -0
- package/lib/typescript/src/audio/remoteVolume.d.ts.map +1 -0
- package/lib/typescript/src/components/VideoView.d.ts +44 -0
- package/lib/typescript/src/components/VideoView.d.ts.map +1 -0
- package/lib/typescript/src/features/audioScenario.d.ts +24 -0
- package/lib/typescript/src/features/audioScenario.d.ts.map +1 -0
- package/lib/typescript/src/features/beauty.d.ts +377 -0
- package/lib/typescript/src/features/beauty.d.ts.map +1 -0
- package/lib/typescript/src/features/micRelease.d.ts +28 -0
- package/lib/typescript/src/features/micRelease.d.ts.map +1 -0
- package/lib/typescript/src/features/noiseSuppression.d.ts +64 -0
- package/lib/typescript/src/features/noiseSuppression.d.ts.map +1 -0
- package/lib/typescript/src/features/roomMusic.d.ts +41 -0
- package/lib/typescript/src/features/roomMusic.d.ts.map +1 -0
- package/lib/typescript/src/features/roomMusicAndroid.d.ts +60 -0
- package/lib/typescript/src/features/roomMusicAndroid.d.ts.map +1 -0
- package/lib/typescript/src/features/roomMusicIos.d.ts +56 -0
- package/lib/typescript/src/features/roomMusicIos.d.ts.map +1 -0
- package/lib/typescript/src/features/roomMusicTypes.d.ts +76 -0
- package/lib/typescript/src/features/roomMusicTypes.d.ts.map +1 -0
- package/lib/typescript/src/features/screenShare.d.ts +12 -0
- package/lib/typescript/src/features/screenShare.d.ts.map +1 -0
- package/lib/typescript/src/features/singerMode.d.ts +20 -0
- package/lib/typescript/src/features/singerMode.d.ts.map +1 -0
- package/lib/typescript/src/features/voiceEffects.d.ts +46 -0
- package/lib/typescript/src/features/voiceEffects.d.ts.map +1 -0
- package/lib/typescript/src/hooks/context.d.ts +12 -0
- package/lib/typescript/src/hooks/context.d.ts.map +1 -0
- package/lib/typescript/src/hooks/hooks.d.ts +54 -0
- package/lib/typescript/src/hooks/hooks.d.ts.map +1 -0
- package/lib/typescript/src/hooks/types.d.ts +8 -0
- package/lib/typescript/src/hooks/types.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useRoomEvents.d.ts +13 -0
- package/lib/typescript/src/hooks/useRoomEvents.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +37 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/ios/autoAttach.d.ts +2 -0
- package/lib/typescript/src/ios/autoAttach.d.ts.map +1 -0
- package/lib/typescript/src/ios/iosAudio.d.ts +96 -0
- package/lib/typescript/src/ios/iosAudio.d.ts.map +1 -0
- package/lib/typescript/src/join/appStateLifecycle.d.ts +14 -0
- package/lib/typescript/src/join/appStateLifecycle.d.ts.map +1 -0
- package/lib/typescript/src/micPolicy.d.ts +104 -0
- package/lib/typescript/src/micPolicy.d.ts.map +1 -0
- package/lib/typescript/src/native/NativeGravixAudio.d.ts +21 -0
- package/lib/typescript/src/native/NativeGravixAudio.d.ts.map +1 -0
- package/lib/typescript/src/native/NativeGravixRtc.d.ts +31 -0
- package/lib/typescript/src/native/NativeGravixRtc.d.ts.map +1 -0
- package/lib/typescript/src/native/module.d.ts +7 -0
- package/lib/typescript/src/native/module.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/DOMException.d.ts +3 -0
- package/lib/typescript/src/polyfills/DOMException.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/early.d.ts +2 -0
- package/lib/typescript/src/polyfills/early.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/event.d.ts +2 -0
- package/lib/typescript/src/polyfills/event.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/sha256.d.ts +3 -0
- package/lib/typescript/src/polyfills/sha256.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/subtleHmac.d.ts +37 -0
- package/lib/typescript/src/polyfills/subtleHmac.d.ts.map +1 -0
- package/lib/typescript/src/polyfills/textCoding.d.ts +36 -0
- package/lib/typescript/src/polyfills/textCoding.d.ts.map +1 -0
- package/lib/typescript/src/registerGlobals.d.ts +42 -0
- package/lib/typescript/src/registerGlobals.d.ts.map +1 -0
- package/lib/typescript/src/unsupported.d.ts +42 -0
- package/lib/typescript/src/unsupported.d.ts.map +1 -0
- package/lib/typescript/src/version.d.ts +3 -0
- package/lib/typescript/src/version.d.ts.map +1 -0
- package/metro/index.js +39 -0
- package/metro/noise-stub.js +10 -0
- package/native/gxfx/include/gx_fx.h +82 -0
- package/native/gxfx/src/gx_fx.cpp +527 -0
- package/native/gxfx/third_party/README.md +4 -0
- package/native/gxfx/third_party/signalsmith-linear/LICENSE.txt +21 -0
- package/native/gxfx/third_party/signalsmith-linear/approx.h +191 -0
- package/native/gxfx/third_party/signalsmith-linear/fft.h +1386 -0
- package/native/gxfx/third_party/signalsmith-linear/linear.h +1129 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/approx-cmsisdsp.h +40 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/basic-fill-warnings.h +61 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-accelerate.h +340 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-cmsisdsp.h +307 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-ipp.h +532 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-linear.h +213 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-pffft-double.h +221 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/fft-pffft.h +221 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/linear-accelerate.h +593 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/linear-cmsisdsp.h +713 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/linear-xsimd-dispatch.cpp +6 -0
- package/native/gxfx/third_party/signalsmith-linear/platform/linear-xsimd.h +818 -0
- package/native/gxfx/third_party/signalsmith-linear/stft.h +700 -0
- package/native/gxfx/third_party/signalsmith-stretch-LICENSE.txt +21 -0
- package/native/gxfx/third_party/signalsmith-stretch.h +1060 -0
- package/native/gxns/CMakeLists.txt +67 -0
- package/native/gxns/include/gx_ns.h +285 -0
- package/native/gxns/src/gx_ns.c +1518 -0
- package/native/gxns/src/gx_ns_timer.c +84 -0
- package/native/gxns/src/gx_ns_timer.h +29 -0
- package/native/gxns/third_party/VENDOR.md +43 -0
- package/native/gxns/third_party/rnnoise/AUTHORS +1 -0
- package/native/gxns/third_party/rnnoise/COPYING +31 -0
- package/native/gxns/third_party/rnnoise/include/rnnoise.h +117 -0
- package/native/gxns/third_party/rnnoise/src/_kiss_fft_guts.h +182 -0
- package/native/gxns/third_party/rnnoise/src/arch.h +261 -0
- package/native/gxns/third_party/rnnoise/src/celt_lpc.c +172 -0
- package/native/gxns/third_party/rnnoise/src/celt_lpc.h +45 -0
- package/native/gxns/third_party/rnnoise/src/common.h +48 -0
- package/native/gxns/third_party/rnnoise/src/denoise.c +664 -0
- package/native/gxns/third_party/rnnoise/src/kiss_fft.c +601 -0
- package/native/gxns/third_party/rnnoise/src/kiss_fft.h +203 -0
- package/native/gxns/third_party/rnnoise/src/opus_types.h +159 -0
- package/native/gxns/third_party/rnnoise/src/pitch.c +523 -0
- package/native/gxns/third_party/rnnoise/src/pitch.h +149 -0
- package/native/gxns/third_party/rnnoise/src/rnn.c +178 -0
- package/native/gxns/third_party/rnnoise/src/rnn.h +65 -0
- package/native/gxns/third_party/rnnoise/src/rnn_data.c +11051 -0
- package/native/gxns/third_party/rnnoise/src/rnn_data.h +34 -0
- package/native/gxns/third_party/rnnoise/src/tansig_table.h +45 -0
- package/native/gxns/third_party/speexdsp/AUTHORS +18 -0
- package/native/gxns/third_party/speexdsp/COPYING +35 -0
- package/native/gxns/third_party/speexdsp/arch.h +232 -0
- package/native/gxns/third_party/speexdsp/resample.c +1239 -0
- package/native/gxns/third_party/speexdsp/resample_neon.h +339 -0
- package/native/gxns/third_party/speexdsp/resample_sse.h +128 -0
- package/native/gxns/third_party/speexdsp/speex_resampler.h +343 -0
- package/package.json +186 -4
- package/src/android/bindings.ts +61 -0
- package/src/android/index.ts +10 -0
- package/src/android/micMute.ts +422 -0
- package/src/android/nativeAudio.ts +94 -0
- package/src/android/noiseSuppression.ts +209 -0
- package/src/android/roomMusic.ts +193 -0
- package/src/android/singerMode.ts +53 -0
- package/src/android/voiceEffects.ts +126 -0
- package/src/audio/AudioManager.ts +111 -0
- package/src/audio/AudioSession.ts +190 -0
- package/src/audio/remoteVolume.ts +58 -0
- package/src/components/VideoView.tsx +152 -0
- package/src/features/audioScenario.ts +58 -0
- package/src/features/beauty.ts +1057 -0
- package/src/features/micRelease.ts +108 -0
- package/src/features/noiseSuppression.ts +251 -0
- package/src/features/roomMusic.ts +106 -0
- package/src/features/roomMusicAndroid.ts +310 -0
- package/src/features/roomMusicIos.ts +300 -0
- package/src/features/roomMusicTypes.ts +97 -0
- package/src/features/screenShare.ts +19 -0
- package/src/features/singerMode.ts +70 -0
- package/src/features/voiceEffects.ts +245 -0
- package/src/hooks/context.tsx +38 -0
- package/src/hooks/hooks.ts +247 -0
- package/src/hooks/types.ts +10 -0
- package/src/hooks/useRoomEvents.ts +35 -0
- package/src/index.tsx +134 -0
- package/src/ios/autoAttach.ts +11 -0
- package/src/ios/iosAudio.ts +202 -0
- package/src/join/appStateLifecycle.ts +55 -0
- package/src/micPolicy.ts +312 -0
- package/src/native/NativeGravixAudio.ts +30 -0
- package/src/native/NativeGravixRtc.ts +38 -0
- package/src/native/module.ts +22 -0
- package/src/polyfills/DOMException.ts +20 -0
- package/src/polyfills/early.ts +16 -0
- package/src/polyfills/event.ts +88 -0
- package/src/polyfills/sha256.ts +112 -0
- package/src/polyfills/subtleHmac.ts +124 -0
- package/src/polyfills/textCoding.ts +197 -0
- package/src/registerGlobals.ts +201 -0
- package/src/unsupported.ts +139 -0
- package/src/version.ts +4 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* Copyright (c) 2024-2026 Gravity Compile. MIT License; see LICENSE. */
|
|
2
|
+
/* gx_fx: on-device voice effects, run on the capture stream after gx_ns.
|
|
3
|
+
*
|
|
4
|
+
* Threads: gx_fx_process is called from the audio thread only and never
|
|
5
|
+
* allocates, locks or logs. Everything else is control-thread only (one
|
|
6
|
+
* thread at a time). gx_fx_destroy needs the audio thread to have stopped. */
|
|
7
|
+
#ifndef GX_FX_H
|
|
8
|
+
#define GX_FX_H
|
|
9
|
+
#ifdef __cplusplus
|
|
10
|
+
extern "C" {
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
typedef enum gx_fx_preset {
|
|
14
|
+
GX_FX_NONE = 0,
|
|
15
|
+
GX_FX_STUDIO = 1,
|
|
16
|
+
GX_FX_HALL = 2,
|
|
17
|
+
GX_FX_ROBOT = 3,
|
|
18
|
+
GX_FX_GIRL = 4,
|
|
19
|
+
GX_FX_TRANSFORMER = 5,
|
|
20
|
+
/* 6..35: same order as kPresets in gx_fx.cpp and the name lists in GxVoiceFx (Kotlin, Swift) and GravixVoiceEffect (Dart) */
|
|
21
|
+
GX_FX_AUTOTUNE_MAJOR_C = 33,
|
|
22
|
+
GX_FX_AUTOTUNE_MINOR_A = 34,
|
|
23
|
+
GX_FX_AUTOTUNE_HARMONIC_MINOR = 35,
|
|
24
|
+
GX_FX_PRESET_COUNT = 36
|
|
25
|
+
} gx_fx_preset;
|
|
26
|
+
|
|
27
|
+
/* gx_fx_process results */
|
|
28
|
+
enum {
|
|
29
|
+
GX_FX_OK = 0, /* pcm now holds the effect */
|
|
30
|
+
GX_FX_PASSTHROUGH = 1, /* pcm untouched */
|
|
31
|
+
GX_FX_NEED_REBUILD = 2, /* pcm untouched; call gx_fx_rebuild from the control thread (once per change) */
|
|
32
|
+
GX_FX_WATCHDOG = 3 /* pcm untouched; the effect just went over budget and stays off until the next set_preset */
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
typedef struct gx_fx gx_fx;
|
|
36
|
+
|
|
37
|
+
typedef struct gx_fx_status {
|
|
38
|
+
int requested; /* last set_preset */
|
|
39
|
+
int active; /* preset in the audio path */
|
|
40
|
+
int rate; /* sample rate of the active chain, 0 when none */
|
|
41
|
+
int bypass; /* music bypass */
|
|
42
|
+
int watchdog; /* 1 after a watchdog trip */
|
|
43
|
+
int latency_ms; /* delay added by the active chain */
|
|
44
|
+
unsigned frames; /* audio blocks processed */
|
|
45
|
+
unsigned over; /* blocks over budget */
|
|
46
|
+
unsigned max_us; /* slowest block */
|
|
47
|
+
} gx_fx_status;
|
|
48
|
+
|
|
49
|
+
typedef struct gx_fx_bench {
|
|
50
|
+
int blocks;
|
|
51
|
+
int p50_us;
|
|
52
|
+
int p95_us;
|
|
53
|
+
int max_us;
|
|
54
|
+
int latency_ms;
|
|
55
|
+
} gx_fx_bench;
|
|
56
|
+
|
|
57
|
+
gx_fx *gx_fx_create(void);
|
|
58
|
+
void gx_fx_destroy(gx_fx *fx);
|
|
59
|
+
|
|
60
|
+
/* Builds the chain here and publishes it to the audio thread. 0, or -1 for an unknown preset. */
|
|
61
|
+
int gx_fx_set_preset(gx_fx *fx, int preset);
|
|
62
|
+
/* Rebuilds the requested preset for the rate the audio thread reported. */
|
|
63
|
+
void gx_fx_rebuild(gx_fx *fx);
|
|
64
|
+
/* Music in the capture stream: output goes dry so the music is not pitch shifted. */
|
|
65
|
+
void gx_fx_set_bypass(gx_fx *fx, int on);
|
|
66
|
+
void gx_fx_set_watchdog(gx_fx *fx, int budget_us, int consecutive);
|
|
67
|
+
void gx_fx_get_status(gx_fx *fx, gx_fx_status *out);
|
|
68
|
+
|
|
69
|
+
/* In place, mono float, one 10 ms block (any block size up to 4096 frames). */
|
|
70
|
+
int gx_fx_process(gx_fx *fx, float *pcm, int frames, int rate);
|
|
71
|
+
|
|
72
|
+
/* The same for int16-scale floats ([-32768, 32767]), which is what WebRTC's
|
|
73
|
+
* capturePostProcessing delivers. gx_fx_process itself wants [-1, 1]. */
|
|
74
|
+
int gx_fx_process_int16_scale(gx_fx *fx, float *pcm, int frames, int rate);
|
|
75
|
+
|
|
76
|
+
/* Runs a preset on a private chain over synthetic speech. Control thread. 0, or -1. */
|
|
77
|
+
int gx_fx_benchmark(int preset, int rate, int seconds, gx_fx_bench *out);
|
|
78
|
+
|
|
79
|
+
#ifdef __cplusplus
|
|
80
|
+
}
|
|
81
|
+
#endif
|
|
82
|
+
#endif
|
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Gravity Compile. MIT License; see LICENSE.
|
|
2
|
+
//
|
|
3
|
+
// Voice effects chain: pitch/formant (Signalsmith Stretch) -> ring modulation ->
|
|
4
|
+
// drive -> echo -> tone -> compressor -> reverb (Freeverb structure, public
|
|
5
|
+
// domain design by Jezar at Dreampoint, delays scaled to the sample rate) ->
|
|
6
|
+
// soft limiter.
|
|
7
|
+
//
|
|
8
|
+
// A chain is built on the control thread and handed over with atomics; the
|
|
9
|
+
// audio thread never allocates or frees one. Every preset is one row of
|
|
10
|
+
// kPresets, so tuning does not touch the code.
|
|
11
|
+
#include "gx_fx.h"
|
|
12
|
+
|
|
13
|
+
#include <algorithm>
|
|
14
|
+
#include <atomic>
|
|
15
|
+
#include <chrono>
|
|
16
|
+
#include <cmath>
|
|
17
|
+
#include <cstring>
|
|
18
|
+
#include <memory>
|
|
19
|
+
#include <mutex>
|
|
20
|
+
#include <vector>
|
|
21
|
+
|
|
22
|
+
#include "../third_party/signalsmith-stretch.h"
|
|
23
|
+
|
|
24
|
+
namespace {
|
|
25
|
+
|
|
26
|
+
const int kMaxFrames = 4096;
|
|
27
|
+
const int kDefaultRate = 48000;
|
|
28
|
+
const int kPitchWindowMs = 40;
|
|
29
|
+
const int kPitchIntervalMs = 10;
|
|
30
|
+
const float kTwoPi = 6.28318530717958647692f;
|
|
31
|
+
|
|
32
|
+
struct Preset {
|
|
33
|
+
float pitch, formant; // semitones; formant relative to the original voice
|
|
34
|
+
float room, damp, wet, dry; // reverb; wet 0 = no reverb
|
|
35
|
+
float ringHz, ringMix;
|
|
36
|
+
float drive; // 1 = none
|
|
37
|
+
float echoMs, echoFeedback, echoMix;
|
|
38
|
+
float highPassHz; // 0 = none
|
|
39
|
+
float peakHz, peakDb;
|
|
40
|
+
bool compress;
|
|
41
|
+
float lowPassHz, peak2Hz, peak2Db;
|
|
42
|
+
int scale; // 0 none, or a kScales index + 1: snap the voice to the scale
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Semitones of each scale (0 = C).
|
|
46
|
+
const bool kScales[3][12] = {
|
|
47
|
+
{1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1}, // C major
|
|
48
|
+
{1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1}, // A minor: the same notes as C major
|
|
49
|
+
{1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1}, // A harmonic minor
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const Preset kPresets[GX_FX_PRESET_COUNT] = {
|
|
53
|
+
// pitch formant room damp wet dry ringHz ringMix drive echoMs fb mix hp peakHz peakDb comp
|
|
54
|
+
/*none*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false},
|
|
55
|
+
/*stud*/ {0, 0, 0.30f, 0.60f, 0.30f, 0.95f, 0, 0, 1, 0, 0, 0, 90, 3000, 2.5f, true},
|
|
56
|
+
/*hall*/ {0, 0, 0.88f, 0.30f, 0.90f, 0.80f, 0, 0, 1, 0, 0, 0, 0, 0, 0, false},
|
|
57
|
+
/*robo*/ {0, 0, 0, 0, 0, 1, 110, 0.90f, 1, 18, 0.35f, 0.30f, 0, 0, 0, false},
|
|
58
|
+
/*girl*/ {5, 3, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false},
|
|
59
|
+
/*tran*/ {-7, -4, 0.30f, 0.50f, 0.45f, 0.90f, 70, 0.50f, 1.6f, 12, 0.30f, 0.25f, 0, 0, 0, false},
|
|
60
|
+
// Voice change. The numbers are starting points, tuned by ear.
|
|
61
|
+
/*boy */ {6, 5, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false},
|
|
62
|
+
/*chld*/ {3, 3, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false},
|
|
63
|
+
/*womn*/ {3, 2, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false},
|
|
64
|
+
/*man */ {-4, -2.5f, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false},
|
|
65
|
+
/*forn*/ {1, 1.5f, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1800, 2.5f, false},
|
|
66
|
+
/*ethr*/ {2, 0, 0.92f, 0.20f, 1.10f, 0.70f, 0, 0, 1, 120, 0.45f, 0.35f, 0, 0, 0, false},
|
|
67
|
+
// Voice character: tone only, so no added delay (falsetto excepted).
|
|
68
|
+
/*magn*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 150, 3.5f, true, 0, 3000, 1.5f},
|
|
69
|
+
/*frsh*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 120, 6000, 3, false},
|
|
70
|
+
/*enrg*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 100, 2500, 3, true},
|
|
71
|
+
/*rich*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 200, 3, false, 0, 4000, 1.5f},
|
|
72
|
+
/*mufl*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, 1800},
|
|
73
|
+
/*rond*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 300, 3, false, 0, 5000, -2},
|
|
74
|
+
/*fals*/ {5, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 120, 3000, 2, false},
|
|
75
|
+
/*full*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 120, 3, true},
|
|
76
|
+
/*cler*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 150, 4000, 4, false},
|
|
77
|
+
/*resn*/ {0, 0, 0.20f, 0.40f, 0.15f, 0.95f, 0, 0, 1, 0, 0, 0, 0, 1000, 4, false},
|
|
78
|
+
/*loud*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 100, 3000, 3, true},
|
|
79
|
+
// Rooms.
|
|
80
|
+
/*soft*/ {0, 0, 0.20f, 0.75f, 0.25f, 0.95f, 0, 0, 1, 0, 0, 0, 0, 0, 0, false},
|
|
81
|
+
/*larg*/ {0, 0, 0.65f, 0.45f, 0.50f, 0.85f, 0, 0, 1, 0, 0, 0, 0, 0, 0, false},
|
|
82
|
+
/*vall*/ {0, 0, 0.75f, 0.40f, 0.50f, 0.80f, 0, 0, 1, 300, 0.40f, 0.35f, 0, 0, 0, false},
|
|
83
|
+
/*base*/ {0, 0, 0.40f, 0.85f, 0.40f, 0.85f, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, 3000},
|
|
84
|
+
/*ktv */ {0, 0, 0.55f, 0.50f, 0.55f, 0.90f, 0, 0, 1, 80, 0.20f, 0.15f, 0, 0, 0, false},
|
|
85
|
+
/*ektv*/ {0, 0, 0.60f, 0.45f, 0.65f, 0.90f, 0, 0, 1, 90, 0.25f, 0.20f, 90, 3500, 2.5f, true},
|
|
86
|
+
/*popl*/ {0, 0, 0.45f, 0.55f, 0.35f, 0.95f, 0, 0, 1, 0, 0, 0, 90, 5000, 2, true},
|
|
87
|
+
/*rock*/ {0, 0, 0.50f, 0.40f, 0.40f, 0.90f, 0, 0, 1.3f, 60, 0.15f, 0.15f, 100, 2500, 3, true},
|
|
88
|
+
/*vcon*/ {0, 0, 0.80f, 0.35f, 0.75f, 0.85f, 0, 0, 1, 0, 0, 0, 90, 3000, 1.5f, false},
|
|
89
|
+
/*gram*/ {0, 0, 0, 0, 0, 1, 0, 0, 1.3f, 0, 0, 0, 300, 1500, 3, false, 3400},
|
|
90
|
+
// Scale snapping: no fixed shift, the pitch detector drives it.
|
|
91
|
+
/*atC */ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, 0, 0, 0, 1},
|
|
92
|
+
/*atAm*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, 0, 0, 0, 2},
|
|
93
|
+
/*atHm*/ {0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, 0, 0, 0, 3},
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
inline float flushDenormal(float v) { return std::fabs(v) < 1e-15f ? 0.f : v; }
|
|
97
|
+
|
|
98
|
+
struct Comb {
|
|
99
|
+
std::vector<float> d; int i = 0; float store = 0, fb = 0, damp = 0;
|
|
100
|
+
void init(int n, float feedback, float dampening) { d.assign(std::max(n, 1), 0.f); fb = feedback; damp = dampening; }
|
|
101
|
+
inline float tick(float x) {
|
|
102
|
+
float y = d[i];
|
|
103
|
+
store = flushDenormal(y * (1 - damp) + store * damp);
|
|
104
|
+
d[i] = x + store * fb;
|
|
105
|
+
if (++i >= (int)d.size()) i = 0;
|
|
106
|
+
return y;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
struct Allpass {
|
|
111
|
+
std::vector<float> d; int i = 0;
|
|
112
|
+
void init(int n) { d.assign(std::max(n, 1), 0.f); }
|
|
113
|
+
inline float tick(float x) {
|
|
114
|
+
float b = flushDenormal(d[i]);
|
|
115
|
+
d[i] = x + b * 0.5f;
|
|
116
|
+
if (++i >= (int)d.size()) i = 0;
|
|
117
|
+
return b - x;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
struct Biquad {
|
|
122
|
+
float b0 = 1, b1 = 0, b2 = 0, a1 = 0, a2 = 0, z1 = 0, z2 = 0;
|
|
123
|
+
inline float tick(float x) {
|
|
124
|
+
float y = b0 * x + z1;
|
|
125
|
+
z1 = flushDenormal(b1 * x - a1 * y + z2);
|
|
126
|
+
z2 = flushDenormal(b2 * x - a2 * y);
|
|
127
|
+
return y;
|
|
128
|
+
}
|
|
129
|
+
void highPass(float hz, int rate) {
|
|
130
|
+
float w = kTwoPi * hz / rate, c = std::cos(w), al = std::sin(w) / 1.414f, a0 = 1 + al;
|
|
131
|
+
b0 = (1 + c) / 2 / a0; b1 = -(1 + c) / a0; b2 = b0; a1 = -2 * c / a0; a2 = (1 - al) / a0;
|
|
132
|
+
}
|
|
133
|
+
void lowPass(float hz, int rate) {
|
|
134
|
+
float w = kTwoPi * hz / rate, c = std::cos(w), al = std::sin(w) / 1.414f, a0 = 1 + al;
|
|
135
|
+
b0 = (1 - c) / 2 / a0; b1 = (1 - c) / a0; b2 = b0; a1 = -2 * c / a0; a2 = (1 - al) / a0;
|
|
136
|
+
}
|
|
137
|
+
void peak(float hz, float db, int rate) {
|
|
138
|
+
float A = std::pow(10.f, db / 40), w = kTwoPi * hz / rate, c = std::cos(w), al = std::sin(w) / 2.f, a0 = 1 + al / A;
|
|
139
|
+
b0 = (1 + al * A) / a0; b1 = -2 * c / a0; b2 = (1 - al * A) / a0; a1 = b1; a2 = (1 - al / A) / a0;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
class Chain {
|
|
144
|
+
public:
|
|
145
|
+
Chain(int preset, int rate) : preset_(preset), rate_(rate), p_(kPresets[preset]) {
|
|
146
|
+
dry_.assign(kMaxFrames, 0.f);
|
|
147
|
+
if (p_.pitch != 0 || p_.scale != 0) {
|
|
148
|
+
in_.assign(kMaxFrames, 0.f);
|
|
149
|
+
stretch_.reset(new signalsmith::stretch::SignalsmithStretch<float>());
|
|
150
|
+
stretch_->configure(1, rate * kPitchWindowMs / 1000, rate * kPitchIntervalMs / 1000);
|
|
151
|
+
stretch_->setTransposeSemitones(p_.pitch);
|
|
152
|
+
stretch_->setFormantSemitones(p_.formant, true);
|
|
153
|
+
stretch_->setFormantBase(150.f / rate);
|
|
154
|
+
latencyMs_ = (stretch_->inputLatency() + stretch_->outputLatency()) * 1000 / rate;
|
|
155
|
+
}
|
|
156
|
+
if (p_.scale != 0) {
|
|
157
|
+
decim_ = std::max(1, rate / 12000);
|
|
158
|
+
int effective = rate / decim_;
|
|
159
|
+
window_ = effective * 30 / 1000;
|
|
160
|
+
minLag_ = std::max(2, effective / 800);
|
|
161
|
+
maxLag_ = effective / 60;
|
|
162
|
+
yinRate_ = (float)effective;
|
|
163
|
+
history_.assign(window_ + maxLag_ + 2, 0.f);
|
|
164
|
+
yin_.assign(maxLag_ + 2, 0.f);
|
|
165
|
+
}
|
|
166
|
+
if (p_.wet > 0) {
|
|
167
|
+
static const int combs[8] = {1116, 1188, 1277, 1356, 1422, 1491, 1557, 1617};
|
|
168
|
+
static const int alls[4] = {556, 441, 341, 225};
|
|
169
|
+
float scale = rate / 44100.f, fb = p_.room * 0.28f + 0.7f, damp = p_.damp * 0.4f;
|
|
170
|
+
for (int i = 0; i < 8; i++) comb_[i].init((int)(combs[i] * scale), fb, damp);
|
|
171
|
+
for (int i = 0; i < 4; i++) all_[i].init((int)(alls[i] * scale));
|
|
172
|
+
}
|
|
173
|
+
if (p_.echoMs > 0) echo_.assign(std::max(1, (int)(rate * p_.echoMs / 1000)), 0.f);
|
|
174
|
+
if (p_.highPassHz > 0) hp_.highPass(p_.highPassHz, rate);
|
|
175
|
+
if (p_.peakDb != 0 && p_.peakHz * 2 < rate) peak_.peak(p_.peakHz, p_.peakDb, rate);
|
|
176
|
+
if (p_.peak2Db != 0 && p_.peak2Hz * 2 < rate) peak2_.peak(p_.peak2Hz, p_.peak2Db, rate);
|
|
177
|
+
useLowPass_ = p_.lowPassHz > 0 && p_.lowPassHz * 2 < rate;
|
|
178
|
+
if (useLowPass_) lowPass_.lowPass(p_.lowPassHz, rate);
|
|
179
|
+
ringInc_ = kTwoPi * p_.ringHz / rate;
|
|
180
|
+
attack_ = 1 - std::exp(-1000.f / (5.f * rate));
|
|
181
|
+
release_ = 1 - std::exp(-1000.f / (120.f * rate));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
int preset() const { return preset_; }
|
|
185
|
+
int rate() const { return rate_; }
|
|
186
|
+
int latencyMs() const { return latencyMs_; }
|
|
187
|
+
float *dry() { return dry_.data(); }
|
|
188
|
+
|
|
189
|
+
void process(float *x, int n) {
|
|
190
|
+
if (p_.scale != 0) detectAndSnap(x, n);
|
|
191
|
+
if (stretch_) {
|
|
192
|
+
std::memcpy(in_.data(), x, sizeof(float) * n);
|
|
193
|
+
const float *inputs[1] = {in_.data()};
|
|
194
|
+
float *outputs[1] = {x};
|
|
195
|
+
stretch_->process(inputs, n, outputs, n);
|
|
196
|
+
}
|
|
197
|
+
for (int i = 0; i < n; i++) {
|
|
198
|
+
float s = x[i];
|
|
199
|
+
if (p_.ringMix > 0) {
|
|
200
|
+
s *= (1 - p_.ringMix) + p_.ringMix * std::sin(ringPhase_);
|
|
201
|
+
ringPhase_ += ringInc_;
|
|
202
|
+
if (ringPhase_ > kTwoPi) ringPhase_ -= kTwoPi;
|
|
203
|
+
}
|
|
204
|
+
if (p_.drive > 1) s = std::tanh(s * p_.drive) / std::tanh(p_.drive);
|
|
205
|
+
if (!echo_.empty()) {
|
|
206
|
+
float d = echo_[echoAt_];
|
|
207
|
+
echo_[echoAt_] = flushDenormal(s + d * p_.echoFeedback);
|
|
208
|
+
if (++echoAt_ >= (int)echo_.size()) echoAt_ = 0;
|
|
209
|
+
s += d * p_.echoMix;
|
|
210
|
+
}
|
|
211
|
+
if (p_.highPassHz > 0) s = hp_.tick(s);
|
|
212
|
+
if (p_.peakDb != 0) s = peak_.tick(s);
|
|
213
|
+
if (p_.peak2Db != 0) s = peak2_.tick(s);
|
|
214
|
+
if (useLowPass_) s = lowPass_.tick(s);
|
|
215
|
+
if (p_.compress) s = compress(s);
|
|
216
|
+
if (p_.wet > 0) {
|
|
217
|
+
float in = s * 0.015f, sum = 0;
|
|
218
|
+
for (auto &c : comb_) sum += c.tick(in);
|
|
219
|
+
for (auto &a : all_) sum = a.tick(sum);
|
|
220
|
+
s = s * p_.dry + sum * p_.wet;
|
|
221
|
+
}
|
|
222
|
+
x[i] = limit(s);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
private:
|
|
227
|
+
inline float compress(float s) {
|
|
228
|
+
float a = std::fabs(s);
|
|
229
|
+
env_ += (a - env_) * (a > env_ ? attack_ : release_);
|
|
230
|
+
env_ = flushDenormal(env_);
|
|
231
|
+
const float threshold = 0.126f; // -18 dB
|
|
232
|
+
float g = 1.f;
|
|
233
|
+
if (env_ > threshold) g = std::pow(threshold / env_, 2.f / 3.f); // 3:1
|
|
234
|
+
return s * g * 1.41f; // +3 dB make-up
|
|
235
|
+
}
|
|
236
|
+
// YIN pitch detection on the input, then a smoothed shift to the nearest note of the scale.
|
|
237
|
+
void detectAndSnap(const float *x, int n) {
|
|
238
|
+
int size = (int)history_.size();
|
|
239
|
+
for (int i = 0; i < n; i++) {
|
|
240
|
+
decimSum_ += x[i];
|
|
241
|
+
if (++decimCount_ < decim_) continue;
|
|
242
|
+
std::memmove(history_.data(), history_.data() + 1, sizeof(float) * (size - 1));
|
|
243
|
+
history_[size - 1] = decimSum_ / decim_;
|
|
244
|
+
decimSum_ = 0;
|
|
245
|
+
decimCount_ = 0;
|
|
246
|
+
}
|
|
247
|
+
float f0 = detectPitch();
|
|
248
|
+
float target = 0;
|
|
249
|
+
if (f0 > 0) {
|
|
250
|
+
float midi = 69 + 12 * std::log2(f0 / 440.f);
|
|
251
|
+
int base = (int)std::lround(midi);
|
|
252
|
+
float best = 1000;
|
|
253
|
+
const bool *scale = kScales[p_.scale - 1];
|
|
254
|
+
for (int d = -2; d <= 2; d++) {
|
|
255
|
+
int note = base + d;
|
|
256
|
+
if (!scale[((note % 12) + 12) % 12]) continue;
|
|
257
|
+
float shift = note - midi;
|
|
258
|
+
if (std::fabs(shift) < std::fabs(best)) best = shift;
|
|
259
|
+
}
|
|
260
|
+
target = best;
|
|
261
|
+
}
|
|
262
|
+
shift_ += (target - shift_) * 0.35f;
|
|
263
|
+
stretch_->setTransposeSemitones(shift_);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
float detectPitch() {
|
|
267
|
+
const float *h = history_.data();
|
|
268
|
+
double energy = 0;
|
|
269
|
+
for (int i = 0; i < window_; i++) energy += h[i] * h[i];
|
|
270
|
+
if (energy / window_ < 1e-5) return 0;
|
|
271
|
+
float *d = yin_.data();
|
|
272
|
+
double running = 0;
|
|
273
|
+
d[0] = 1;
|
|
274
|
+
for (int tau = 1; tau <= maxLag_; tau++) {
|
|
275
|
+
double sum = 0;
|
|
276
|
+
for (int i = 0; i < window_; i++) { double v = h[i] - h[i + tau]; sum += v * v; }
|
|
277
|
+
running += sum;
|
|
278
|
+
d[tau] = running > 0 ? (float)(sum * tau / running) : 1.f;
|
|
279
|
+
}
|
|
280
|
+
for (int tau = minLag_; tau < maxLag_; tau++) {
|
|
281
|
+
if (d[tau] >= 0.15f) continue;
|
|
282
|
+
while (tau + 1 < maxLag_ && d[tau + 1] < d[tau]) tau++;
|
|
283
|
+
float a = d[tau - 1], b = d[tau], c = d[tau + 1], denom = a - 2 * b + c;
|
|
284
|
+
float refined = tau + (std::fabs(denom) > 1e-6f ? 0.5f * (a - c) / denom : 0);
|
|
285
|
+
return yinRate_ / refined;
|
|
286
|
+
}
|
|
287
|
+
return 0;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
static inline float limit(float s) {
|
|
291
|
+
if (std::isnan(s)) return 0.f;
|
|
292
|
+
float a = std::fabs(s);
|
|
293
|
+
if (a <= 0.8f) return s;
|
|
294
|
+
float o = 0.8f + 0.2f * std::tanh((a - 0.8f) / 0.2f);
|
|
295
|
+
return s < 0 ? -o : o;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
int preset_, rate_, latencyMs_ = 0;
|
|
299
|
+
Preset p_;
|
|
300
|
+
std::vector<float> dry_, in_, echo_;
|
|
301
|
+
std::unique_ptr<signalsmith::stretch::SignalsmithStretch<float>> stretch_;
|
|
302
|
+
Comb comb_[8];
|
|
303
|
+
Allpass all_[4];
|
|
304
|
+
Biquad hp_, peak_, peak2_, lowPass_;
|
|
305
|
+
bool useLowPass_ = false;
|
|
306
|
+
std::vector<float> history_, yin_;
|
|
307
|
+
int decim_ = 1, decimCount_ = 0, window_ = 0, minLag_ = 0, maxLag_ = 0;
|
|
308
|
+
float decimSum_ = 0, shift_ = 0, yinRate_ = 0;
|
|
309
|
+
int echoAt_ = 0;
|
|
310
|
+
float ringPhase_ = 0, ringInc_ = 0, env_ = 0, attack_ = 0, release_ = 0;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
Chain *noneToken() {
|
|
314
|
+
static Chain *t = new Chain(GX_FX_NONE, kDefaultRate);
|
|
315
|
+
return t;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
inline void ramp(float *x, int n, float from, float to) {
|
|
319
|
+
float step = (to - from) / n, g = from;
|
|
320
|
+
for (int i = 0; i < n; i++) { g += step; x[i] *= g; }
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
} // namespace
|
|
324
|
+
|
|
325
|
+
struct gx_fx {
|
|
326
|
+
// control -> audio
|
|
327
|
+
std::atomic<Chain *> pending{nullptr};
|
|
328
|
+
std::atomic<int> bypass{0};
|
|
329
|
+
std::atomic<int> budgetUs{0};
|
|
330
|
+
std::atomic<int> consecutive{0};
|
|
331
|
+
std::atomic<unsigned> epoch{0}; // set_preset clears the watchdog through this
|
|
332
|
+
// audio -> control
|
|
333
|
+
std::atomic<Chain *> retired{nullptr};
|
|
334
|
+
std::atomic<int> wantedRate{0};
|
|
335
|
+
std::atomic<int> activePreset{GX_FX_NONE};
|
|
336
|
+
std::atomic<int> activeRate{0};
|
|
337
|
+
std::atomic<int> activeLatency{0};
|
|
338
|
+
std::atomic<int> watchdog{0};
|
|
339
|
+
std::atomic<unsigned> frames{0};
|
|
340
|
+
std::atomic<unsigned> over{0};
|
|
341
|
+
std::atomic<unsigned> maxUs{0};
|
|
342
|
+
// audio thread only
|
|
343
|
+
Chain *chain = nullptr;
|
|
344
|
+
unsigned seenEpoch = 0;
|
|
345
|
+
int overRun = 0;
|
|
346
|
+
bool fadeIn = false;
|
|
347
|
+
float wetGain = 1;
|
|
348
|
+
// control thread only
|
|
349
|
+
std::mutex control;
|
|
350
|
+
int requested = GX_FX_NONE;
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
static void reapLocked(gx_fx *fx) {
|
|
354
|
+
Chain *r = fx->retired.exchange(nullptr, std::memory_order_acq_rel);
|
|
355
|
+
if (r) delete r;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
static void publishLocked(gx_fx *fx, int preset) {
|
|
359
|
+
reapLocked(fx);
|
|
360
|
+
int rate = fx->wantedRate.load(std::memory_order_acquire);
|
|
361
|
+
if (rate <= 0) rate = kDefaultRate;
|
|
362
|
+
Chain *c = preset == GX_FX_NONE ? noneToken() : new Chain(preset, rate);
|
|
363
|
+
Chain *old = fx->pending.exchange(c, std::memory_order_acq_rel);
|
|
364
|
+
if (old && old != noneToken()) delete old;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
extern "C" {
|
|
368
|
+
|
|
369
|
+
gx_fx *gx_fx_create(void) {
|
|
370
|
+
noneToken();
|
|
371
|
+
return new gx_fx();
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
void gx_fx_destroy(gx_fx *fx) {
|
|
375
|
+
if (!fx) return;
|
|
376
|
+
Chain *p = fx->pending.exchange(nullptr);
|
|
377
|
+
if (p && p != noneToken()) delete p;
|
|
378
|
+
reapLocked(fx);
|
|
379
|
+
delete fx->chain;
|
|
380
|
+
delete fx;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
int gx_fx_set_preset(gx_fx *fx, int preset) {
|
|
384
|
+
if (!fx || preset < 0 || preset >= GX_FX_PRESET_COUNT) return -1;
|
|
385
|
+
std::lock_guard<std::mutex> l(fx->control);
|
|
386
|
+
fx->requested = preset;
|
|
387
|
+
publishLocked(fx, preset);
|
|
388
|
+
fx->epoch.fetch_add(1, std::memory_order_release);
|
|
389
|
+
fx->watchdog.store(0, std::memory_order_relaxed);
|
|
390
|
+
return 0;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
void gx_fx_rebuild(gx_fx *fx) {
|
|
394
|
+
if (!fx) return;
|
|
395
|
+
std::lock_guard<std::mutex> l(fx->control);
|
|
396
|
+
if (fx->requested != GX_FX_NONE) publishLocked(fx, fx->requested);
|
|
397
|
+
else reapLocked(fx);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
void gx_fx_set_bypass(gx_fx *fx, int on) { if (fx) fx->bypass.store(on ? 1 : 0, std::memory_order_relaxed); }
|
|
401
|
+
|
|
402
|
+
void gx_fx_set_watchdog(gx_fx *fx, int budget_us, int consecutive) {
|
|
403
|
+
if (!fx) return;
|
|
404
|
+
fx->budgetUs.store(budget_us, std::memory_order_relaxed);
|
|
405
|
+
fx->consecutive.store(consecutive, std::memory_order_relaxed);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
void gx_fx_get_status(gx_fx *fx, gx_fx_status *o) {
|
|
409
|
+
if (!fx || !o) return;
|
|
410
|
+
std::lock_guard<std::mutex> l(fx->control);
|
|
411
|
+
reapLocked(fx);
|
|
412
|
+
o->requested = fx->requested;
|
|
413
|
+
o->active = fx->activePreset.load(std::memory_order_relaxed);
|
|
414
|
+
o->rate = fx->activeRate.load(std::memory_order_relaxed);
|
|
415
|
+
o->bypass = fx->bypass.load(std::memory_order_relaxed);
|
|
416
|
+
o->watchdog = fx->watchdog.load(std::memory_order_relaxed);
|
|
417
|
+
o->latency_ms = fx->activeLatency.load(std::memory_order_relaxed);
|
|
418
|
+
o->frames = fx->frames.load(std::memory_order_relaxed);
|
|
419
|
+
o->over = fx->over.load(std::memory_order_relaxed);
|
|
420
|
+
o->max_us = fx->maxUs.load(std::memory_order_relaxed);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
int gx_fx_process_int16_scale(gx_fx *fx, float *pcm, int n, int rate) {
|
|
424
|
+
if (!pcm || n <= 0 || n > kMaxFrames) return GX_FX_PASSTHROUGH;
|
|
425
|
+
for (int i = 0; i < n; i++) pcm[i] *= 1.f / 32768.f; // a power of two: an untouched block comes back exact
|
|
426
|
+
int rc = gx_fx_process(fx, pcm, n, rate);
|
|
427
|
+
for (int i = 0; i < n; i++) pcm[i] *= 32768.f;
|
|
428
|
+
return rc;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
int gx_fx_process(gx_fx *fx, float *pcm, int n, int rate) {
|
|
432
|
+
Chain *next = fx->pending.load(std::memory_order_acquire);
|
|
433
|
+
Chain *c = fx->chain;
|
|
434
|
+
if (!next && !c) return GX_FX_PASSTHROUGH;
|
|
435
|
+
if (!pcm || n <= 0 || n > kMaxFrames || rate <= 0) return GX_FX_PASSTHROUGH;
|
|
436
|
+
|
|
437
|
+
// A new chain waits for the retired slot, so the audio thread never frees one.
|
|
438
|
+
if (next && !fx->retired.load(std::memory_order_acquire)) {
|
|
439
|
+
if (c && c->rate() == rate) {
|
|
440
|
+
std::memcpy(c->dry(), pcm, sizeof(float) * n);
|
|
441
|
+
c->process(pcm, n);
|
|
442
|
+
}
|
|
443
|
+
ramp(pcm, n, 1.f, 0.f);
|
|
444
|
+
Chain *taken = fx->pending.exchange(nullptr, std::memory_order_acq_rel);
|
|
445
|
+
fx->retired.store(c, std::memory_order_release);
|
|
446
|
+
c = taken == noneToken() ? nullptr : taken;
|
|
447
|
+
fx->chain = c;
|
|
448
|
+
fx->fadeIn = true;
|
|
449
|
+
fx->overRun = 0;
|
|
450
|
+
fx->activePreset.store(c ? c->preset() : GX_FX_NONE, std::memory_order_relaxed);
|
|
451
|
+
fx->activeRate.store(c ? c->rate() : 0, std::memory_order_relaxed);
|
|
452
|
+
fx->activeLatency.store(c ? c->latencyMs() : 0, std::memory_order_relaxed);
|
|
453
|
+
return GX_FX_OK;
|
|
454
|
+
}
|
|
455
|
+
if (!c) {
|
|
456
|
+
if (fx->fadeIn) { ramp(pcm, n, 0.f, 1.f); fx->fadeIn = false; return GX_FX_OK; }
|
|
457
|
+
return GX_FX_PASSTHROUGH;
|
|
458
|
+
}
|
|
459
|
+
if (fx->seenEpoch != fx->epoch.load(std::memory_order_acquire)) {
|
|
460
|
+
fx->seenEpoch = fx->epoch.load(std::memory_order_relaxed);
|
|
461
|
+
fx->overRun = 0;
|
|
462
|
+
}
|
|
463
|
+
if (c->rate() != rate) {
|
|
464
|
+
if (fx->wantedRate.exchange(rate, std::memory_order_acq_rel) != rate) return GX_FX_NEED_REBUILD;
|
|
465
|
+
return GX_FX_PASSTHROUGH;
|
|
466
|
+
}
|
|
467
|
+
if (fx->watchdog.load(std::memory_order_relaxed)) return GX_FX_PASSTHROUGH;
|
|
468
|
+
|
|
469
|
+
auto t0 = std::chrono::steady_clock::now();
|
|
470
|
+
float *dry = c->dry();
|
|
471
|
+
std::memcpy(dry, pcm, sizeof(float) * n);
|
|
472
|
+
c->process(pcm, n); // keeps running in bypass, so the chain is primed when music stops
|
|
473
|
+
|
|
474
|
+
float target = fx->bypass.load(std::memory_order_relaxed) ? 0.f : 1.f;
|
|
475
|
+
float g = fx->wetGain, step = (target - g) / n;
|
|
476
|
+
for (int i = 0; i < n; i++) { g += step; pcm[i] = pcm[i] * g + dry[i] * (1 - g); }
|
|
477
|
+
fx->wetGain = target;
|
|
478
|
+
if (fx->fadeIn) { ramp(pcm, n, 0.f, 1.f); fx->fadeIn = false; }
|
|
479
|
+
|
|
480
|
+
auto us = (unsigned)std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - t0).count();
|
|
481
|
+
fx->frames.fetch_add(1, std::memory_order_relaxed);
|
|
482
|
+
if (us > fx->maxUs.load(std::memory_order_relaxed)) fx->maxUs.store(us, std::memory_order_relaxed);
|
|
483
|
+
int budget = fx->budgetUs.load(std::memory_order_relaxed);
|
|
484
|
+
if (budget > 0 && (int)us > budget) {
|
|
485
|
+
fx->over.fetch_add(1, std::memory_order_relaxed);
|
|
486
|
+
int limit = fx->consecutive.load(std::memory_order_relaxed);
|
|
487
|
+
if (limit > 0 && ++fx->overRun >= limit) {
|
|
488
|
+
fx->watchdog.store(1, std::memory_order_relaxed);
|
|
489
|
+
return GX_FX_WATCHDOG;
|
|
490
|
+
}
|
|
491
|
+
} else {
|
|
492
|
+
fx->overRun = 0;
|
|
493
|
+
}
|
|
494
|
+
return GX_FX_OK;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
int gx_fx_benchmark(int preset, int rate, int seconds, gx_fx_bench *o) {
|
|
498
|
+
if (!o || preset < 0 || preset >= GX_FX_PRESET_COUNT || rate < 8000 || rate > 48000 || seconds <= 0 || seconds > 60) return -1;
|
|
499
|
+
Chain chain(preset, rate);
|
|
500
|
+
int n = rate / 100, blocks = seconds * 100;
|
|
501
|
+
std::vector<float> x(n);
|
|
502
|
+
std::vector<int> t;
|
|
503
|
+
t.reserve(blocks);
|
|
504
|
+
float phase = 0;
|
|
505
|
+
for (int b = 0; b < blocks; b++) {
|
|
506
|
+
float env = 0.15f + 0.1f * std::sin(b * 0.07f);
|
|
507
|
+
for (int i = 0; i < n; i++) {
|
|
508
|
+
phase += kTwoPi * 140.f / rate;
|
|
509
|
+
if (phase > kTwoPi) phase -= kTwoPi;
|
|
510
|
+
float s = 0;
|
|
511
|
+
for (int h = 1; h <= 12; h++) s += std::sin(phase * h) / h;
|
|
512
|
+
x[i] = s * env;
|
|
513
|
+
}
|
|
514
|
+
auto t0 = std::chrono::steady_clock::now();
|
|
515
|
+
chain.process(x.data(), n);
|
|
516
|
+
t.push_back((int)std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - t0).count());
|
|
517
|
+
}
|
|
518
|
+
std::sort(t.begin(), t.end());
|
|
519
|
+
o->blocks = blocks;
|
|
520
|
+
o->p50_us = t[blocks / 2];
|
|
521
|
+
o->p95_us = t[blocks * 95 / 100];
|
|
522
|
+
o->max_us = t.back();
|
|
523
|
+
o->latency_ms = chain.latencyMs();
|
|
524
|
+
return 0;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
} // extern "C"
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Vendored, unmodified
|
|
2
|
+
|
|
3
|
+
- `signalsmith-stretch.h`: https://github.com/Signalsmith-Audio/signalsmith-stretch (88061fd), MIT.
|
|
4
|
+
- `signalsmith-linear/`: https://github.com/Signalsmith-Audio/linear (7bb1c8f), MIT. Headers only; the upstream `include/` forwarders are dropped because `signalsmith-stretch.h` finds `signalsmith-linear/stft.h` next to itself.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Signalsmith Audio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|