react-native-audio-api 0.11.0-alpha.0 → 0.11.0-nightly-bfab178-20251107
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/README.md +13 -11
- package/RNAudioAPI.podspec +20 -15
- package/android/build.gradle +33 -3
- package/android/src/main/cpp/audioapi/CMakeLists.txt +6 -3
- package/android/src/main/cpp/audioapi/android/AudioAPIModule.cpp +5 -0
- package/android/src/main/cpp/audioapi/android/AudioAPIModule.h +1 -0
- package/android/src/main/cpp/audioapi/android/core/AndroidAudioRecorder.cpp +30 -94
- package/android/src/main/cpp/audioapi/android/core/AndroidAudioRecorder.h +14 -28
- package/android/src/main/cpp/audioapi/android/core/AudioPlayer.cpp +4 -2
- package/android/src/main/cpp/audioapi/android/core/NativeAudioRecorder.hpp +9 -9
- package/android/src/main/cpp/audioapi/android/core/utils/AudioDecoder.cpp +6 -0
- package/android/src/main/java/com/swmansion/audioapi/AudioAPIModule.kt +31 -3
- package/android/src/main/java/com/swmansion/audioapi/system/AudioFocusListener.kt +21 -9
- package/android/src/main/java/com/swmansion/audioapi/system/LockScreenManager.kt +27 -6
- package/android/src/main/java/com/swmansion/audioapi/system/MediaNotificationManager.kt +11 -0
- package/android/src/oldarch/NativeAudioAPIModuleSpec.java +4 -0
- package/common/cpp/audioapi/AudioAPIModuleInstaller.h +30 -2
- package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.cpp +18 -0
- package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.h +1 -0
- package/common/cpp/audioapi/HostObjects/effects/BiquadFilterNodeHostObject.cpp +1 -1
- package/common/cpp/audioapi/HostObjects/effects/ConvolverNodeHostObject.cpp +47 -0
- package/common/cpp/audioapi/HostObjects/effects/ConvolverNodeHostObject.h +20 -0
- package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.cpp +18 -80
- package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.h +6 -15
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferBaseSourceNodeHostObject.cpp +1 -1
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferSourceNodeHostObject.cpp +1 -1
- package/common/cpp/audioapi/HostObjects/sources/AudioScheduledSourceNodeHostObject.cpp +1 -1
- package/common/cpp/audioapi/core/AudioNode.h +3 -2
- package/common/cpp/audioapi/core/AudioParam.cpp +2 -2
- package/common/cpp/audioapi/core/BaseAudioContext.cpp +10 -0
- package/common/cpp/audioapi/core/BaseAudioContext.h +2 -0
- package/common/cpp/audioapi/core/effects/BiquadFilterNode.cpp +69 -32
- package/common/cpp/audioapi/core/effects/BiquadFilterNode.h +37 -1
- package/common/cpp/audioapi/core/effects/ConvolverNode.cpp +210 -0
- package/common/cpp/audioapi/core/effects/ConvolverNode.h +55 -0
- package/common/cpp/audioapi/core/inputs/AudioRecorder.cpp +49 -102
- package/common/cpp/audioapi/core/inputs/AudioRecorder.h +28 -46
- package/common/cpp/audioapi/core/sources/AudioBufferBaseSourceNode.cpp +14 -17
- package/common/cpp/audioapi/core/sources/AudioBufferBaseSourceNode.h +0 -1
- package/common/cpp/audioapi/core/sources/AudioBufferSourceNode.cpp +8 -14
- package/common/cpp/audioapi/core/sources/AudioBufferSourceNode.h +0 -1
- package/common/cpp/audioapi/core/sources/AudioScheduledSourceNode.cpp +14 -18
- package/common/cpp/audioapi/core/sources/AudioScheduledSourceNode.h +2 -2
- package/common/cpp/audioapi/core/sources/StreamerNode.cpp +64 -64
- package/common/cpp/audioapi/core/sources/StreamerNode.h +38 -10
- package/common/cpp/audioapi/core/utils/AudioNodeManager.cpp +5 -0
- package/common/cpp/audioapi/core/utils/Constants.h +2 -1
- package/common/cpp/audioapi/core/utils/worklets/SafeIncludes.h +12 -8
- package/common/cpp/audioapi/core/utils/worklets/WorkletsRunner.cpp +3 -3
- package/common/cpp/audioapi/core/utils/worklets/WorkletsRunner.h +1 -1
- package/common/cpp/audioapi/dsp/AudioUtils.cpp +1 -1
- package/common/cpp/audioapi/dsp/Convolver.cpp +213 -0
- package/common/cpp/audioapi/dsp/Convolver.h +45 -0
- package/common/cpp/audioapi/dsp/FFT.cpp +0 -26
- package/common/cpp/audioapi/dsp/FFT.h +26 -2
- package/common/cpp/audioapi/events/AudioEventHandlerRegistry.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/avcodec.h +4 -4
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_desc.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_id.h +3 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_par.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/defs.h +3 -0
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/packet.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/smpte_436m.h +254 -0
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/version.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavformat/avformat.h +6 -6
- package/common/cpp/audioapi/external/ffmpeg_include/libavformat/version.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavformat/version_major.h +2 -0
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avassert.h +5 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avutil.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/channel_layout.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/csp.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/dict.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/ffversion.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/film_grain_params.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/frame.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hdr_dynamic_vivid_metadata.h +3 -3
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_opencl.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_qsv.h +0 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_vulkan.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/iamf.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/lfg.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/log.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/mathematics.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/opt.h +4 -4
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/rational.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/rc4.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/refstruct.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/spherical.h +6 -0
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tdrdi.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tx.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/version.h +3 -3
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/video_hint.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libswresample/swresample.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libswresample/version.h +1 -1
- package/common/cpp/audioapi/libs/ffmpeg/FFmpegDecoding.cpp +2 -3
- package/common/cpp/audioapi/libs/ffmpeg/relinking.md +24 -0
- package/common/cpp/audioapi/utils/AlignedAllocator.hpp +50 -0
- package/common/cpp/audioapi/utils/AudioBus.cpp +28 -0
- package/common/cpp/audioapi/utils/AudioBus.h +3 -0
- package/common/cpp/audioapi/utils/ThreadPool.hpp +59 -1
- package/common/cpp/test/CMakeLists.txt +19 -14
- package/common/cpp/test/src/AudioParamTest.cpp +1 -1
- package/common/cpp/test/src/AudioScheduledSourceTest.cpp +134 -0
- package/common/cpp/test/src/ConstantSourceTest.cpp +1 -1
- package/common/cpp/test/src/GainTest.cpp +1 -1
- package/common/cpp/test/src/MockAudioEventHandlerRegistry.h +4 -4
- package/common/cpp/test/src/OscillatorTest.cpp +1 -1
- package/common/cpp/test/src/StereoPannerTest.cpp +1 -1
- package/common/cpp/test/src/biquad/BiquadFilterChromium.cpp +389 -0
- package/common/cpp/test/src/biquad/BiquadFilterChromium.h +64 -0
- package/common/cpp/test/src/biquad/BiquadFilterTest.cpp +284 -0
- package/common/cpp/test/src/biquad/BiquadFilterTest.h +40 -0
- package/ios/audioapi/ios/AudioAPIModule.h +2 -1
- package/ios/audioapi/ios/AudioAPIModule.mm +13 -0
- package/ios/audioapi/ios/core/IOSAudioRecorder.h +9 -18
- package/ios/audioapi/ios/core/IOSAudioRecorder.mm +28 -70
- package/ios/audioapi/ios/core/NativeAudioRecorder.h +6 -2
- package/ios/audioapi/ios/core/NativeAudioRecorder.m +73 -5
- package/ios/audioapi/ios/system/AudioEngine.mm +3 -3
- package/ios/audioapi/ios/system/AudioSessionManager.h +2 -0
- package/ios/audioapi/ios/system/AudioSessionManager.mm +24 -0
- package/ios/audioapi/ios/system/LockScreenManager.h +0 -1
- package/ios/audioapi/ios/system/LockScreenManager.mm +6 -19
- package/lib/commonjs/api.js +141 -76
- package/lib/commonjs/api.js.map +1 -1
- package/lib/commonjs/api.web.js +8 -0
- package/lib/commonjs/api.web.js.map +1 -1
- package/lib/commonjs/core/AudioContext.js +1 -1
- package/lib/commonjs/core/AudioContext.js.map +1 -1
- package/lib/commonjs/core/AudioRecorder.js +12 -157
- package/lib/commonjs/core/AudioRecorder.js.map +1 -1
- package/lib/commonjs/core/BaseAudioContext.js +28 -25
- package/lib/commonjs/core/BaseAudioContext.js.map +1 -1
- package/lib/commonjs/core/ConvolverNode.js +37 -0
- package/lib/commonjs/core/ConvolverNode.js.map +1 -0
- package/lib/commonjs/core/OfflineAudioContext.js +1 -1
- package/lib/commonjs/core/OfflineAudioContext.js.map +1 -1
- package/lib/commonjs/specs/NativeAudioAPIModule.js.map +1 -1
- package/lib/commonjs/system/AudioManager.js +3 -0
- package/lib/commonjs/system/AudioManager.js.map +1 -1
- package/lib/commonjs/types.js +0 -46
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/index.js +19 -21
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/web-core/AudioContext.js +12 -0
- package/lib/commonjs/web-core/AudioContext.js.map +1 -1
- package/lib/commonjs/web-core/ConvolverNode.js +40 -0
- package/lib/commonjs/web-core/ConvolverNode.js.map +1 -0
- package/lib/commonjs/web-core/ConvolverNodeOptions.js +6 -0
- package/lib/commonjs/web-core/ConvolverNodeOptions.js.map +1 -0
- package/lib/commonjs/web-core/OfflineAudioContext.js +12 -0
- package/lib/commonjs/web-core/OfflineAudioContext.js.map +1 -1
- package/lib/module/api.js +16 -15
- package/lib/module/api.js.map +1 -1
- package/lib/module/api.web.js +1 -0
- package/lib/module/api.web.js.map +1 -1
- package/lib/module/core/AudioContext.js +2 -2
- package/lib/module/core/AudioContext.js.map +1 -1
- package/lib/module/core/AudioRecorder.js +12 -157
- package/lib/module/core/AudioRecorder.js.map +1 -1
- package/lib/module/core/BaseAudioContext.js +29 -26
- package/lib/module/core/BaseAudioContext.js.map +1 -1
- package/lib/module/core/ConvolverNode.js +31 -0
- package/lib/module/core/ConvolverNode.js.map +1 -0
- package/lib/module/core/OfflineAudioContext.js +2 -2
- package/lib/module/core/OfflineAudioContext.js.map +1 -1
- package/lib/module/specs/NativeAudioAPIModule.js.map +1 -1
- package/lib/module/system/AudioManager.js +3 -0
- package/lib/module/system/AudioManager.js.map +1 -1
- package/lib/module/types.js +1 -45
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/index.js +15 -2
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/web-core/AudioContext.js +12 -0
- package/lib/module/web-core/AudioContext.js.map +1 -1
- package/lib/module/web-core/ConvolverNode.js +34 -0
- package/lib/module/web-core/ConvolverNode.js.map +1 -0
- package/lib/module/web-core/ConvolverNodeOptions.js +4 -0
- package/lib/module/web-core/ConvolverNodeOptions.js.map +1 -0
- package/lib/module/web-core/OfflineAudioContext.js +12 -0
- package/lib/module/web-core/OfflineAudioContext.js.map +1 -1
- package/lib/typescript/api.d.ts +19 -17
- package/lib/typescript/api.d.ts.map +1 -1
- package/lib/typescript/api.web.d.ts +1 -0
- package/lib/typescript/api.web.d.ts.map +1 -1
- package/lib/typescript/core/AudioContext.d.ts.map +1 -1
- package/lib/typescript/core/AudioRecorder.d.ts +6 -58
- package/lib/typescript/core/AudioRecorder.d.ts.map +1 -1
- package/lib/typescript/core/BaseAudioContext.d.ts +3 -1
- package/lib/typescript/core/BaseAudioContext.d.ts.map +1 -1
- package/lib/typescript/core/ConvolverNode.d.ts +12 -0
- package/lib/typescript/core/ConvolverNode.d.ts.map +1 -0
- package/lib/typescript/events/types.d.ts +0 -16
- package/lib/typescript/events/types.d.ts.map +1 -1
- package/lib/typescript/interfaces.d.ts +8 -39
- package/lib/typescript/interfaces.d.ts.map +1 -1
- package/lib/typescript/specs/NativeAudioAPIModule.d.ts +1 -0
- package/lib/typescript/specs/NativeAudioAPIModule.d.ts.map +1 -1
- package/lib/typescript/system/AudioManager.d.ts +1 -0
- package/lib/typescript/system/AudioManager.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +8 -74
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/index.d.ts +5 -2
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/lib/typescript/web-core/AudioContext.d.ts +3 -0
- package/lib/typescript/web-core/AudioContext.d.ts.map +1 -1
- package/lib/typescript/web-core/BaseAudioContext.d.ts +2 -0
- package/lib/typescript/web-core/BaseAudioContext.d.ts.map +1 -1
- package/lib/typescript/web-core/ConvolverNode.d.ts +11 -0
- package/lib/typescript/web-core/ConvolverNode.d.ts.map +1 -0
- package/lib/typescript/web-core/ConvolverNodeOptions.d.ts +6 -0
- package/lib/typescript/web-core/ConvolverNodeOptions.d.ts.map +1 -0
- package/lib/typescript/web-core/OfflineAudioContext.d.ts +3 -0
- package/lib/typescript/web-core/OfflineAudioContext.d.ts.map +1 -1
- package/package.json +14 -5
- package/scripts/download-prebuilt-binaries.sh +61 -0
- package/scripts/rnaa_utils.rb +8 -0
- package/scripts/validate-worklets-version.js +28 -0
- package/src/api.ts +45 -18
- package/src/api.web.ts +1 -0
- package/src/core/AudioContext.ts +3 -2
- package/src/core/AudioRecorder.ts +20 -190
- package/src/core/BaseAudioContext.ts +67 -60
- package/src/core/ConvolverNode.ts +35 -0
- package/src/core/OfflineAudioContext.ts +2 -2
- package/src/events/types.ts +0 -18
- package/src/interfaces.ts +15 -47
- package/src/specs/NativeAudioAPIModule.ts +1 -0
- package/src/system/AudioManager.ts +4 -0
- package/src/types.ts +9 -84
- package/src/utils/index.ts +22 -2
- package/src/web-core/AudioContext.tsx +25 -0
- package/src/web-core/BaseAudioContext.tsx +2 -0
- package/src/web-core/ConvolverNode.tsx +43 -0
- package/src/web-core/ConvolverNodeOptions.tsx +6 -0
- package/src/web-core/OfflineAudioContext.tsx +25 -0
- package/android/src/main/cpp/audioapi/android/core/utils/AndroidFileWriterBackend.h +0 -33
- package/android/src/main/cpp/audioapi/android/core/utils/FileUtils.h +0 -34
- package/android/src/main/cpp/audioapi/android/core/utils/FileUtilts.cpp +0 -133
- package/android/src/main/cpp/audioapi/android/core/utils/MiniaudioImplementation.cpp +0 -3
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegAudioFileOptions.cpp +0 -154
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegAudioFileOptions.h +0 -41
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegFileWriter.cpp +0 -431
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegFileWriter.h +0 -112
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileOptions.cpp +0 -47
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileOptions.h +0 -28
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileWriter.cpp +0 -237
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileWriter.h +0 -46
- package/android/src/main/cpp/audioapi/android/system/NativeFileInfo.hpp +0 -31
- package/android/src/main/java/com/swmansion/audioapi/system/NativeFileInfo.kt +0 -18
- package/android/src/main/jniLibs/arm64-v8a/libavcodec.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/libavformat.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/libavutil.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/libswresample.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libavcodec.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libavformat.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libavutil.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libswresample.so +0 -0
- package/android/src/main/jniLibs/x86/libavcodec.so +0 -0
- package/android/src/main/jniLibs/x86/libavformat.so +0 -0
- package/android/src/main/jniLibs/x86/libavutil.so +0 -0
- package/android/src/main/jniLibs/x86/libswresample.so +0 -0
- package/android/src/main/jniLibs/x86_64/libavcodec.so +0 -0
- package/android/src/main/jniLibs/x86_64/libavformat.so +0 -0
- package/android/src/main/jniLibs/x86_64/libavutil.so +0 -0
- package/android/src/main/jniLibs/x86_64/libswresample.so +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libogg.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libopus.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libssl.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libogg.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libopus.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libssl.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libogg.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libopus.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libssl.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libogg.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libopus.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libssl.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/libavcodec.xcframework/Info.plist +0 -44
- package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/libavcodec +0 -0
- package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/libavcodec +0 -0
- package/common/cpp/audioapi/external/libavformat.xcframework/Info.plist +0 -44
- package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/libavformat +0 -0
- package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/libavformat +0 -0
- package/common/cpp/audioapi/external/libavutil.xcframework/Info.plist +0 -44
- package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/libavutil +0 -0
- package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/libavutil +0 -0
- package/common/cpp/audioapi/external/libswresample.xcframework/Info.plist +0 -44
- package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/libswresample +0 -0
- package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/libswresample +0 -0
- package/common/cpp/audioapi/external/x86/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/x86/libogg.a +0 -0
- package/common/cpp/audioapi/external/x86/libopus.a +0 -0
- package/common/cpp/audioapi/external/x86/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/x86/libssl.a +0 -0
- package/common/cpp/audioapi/external/x86/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/x86/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/x86/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libogg.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libopus.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libssl.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/libs/ffmpeg/INSTRUCTIONS.md +0 -32
- package/common/cpp/audioapi/libs/ffmpeg/create_xcframework.sh +0 -111
- package/common/cpp/audioapi/libs/ffmpeg/ffmpeg_setup.sh +0 -391
- package/ios/audioapi/ios/core/IOSAudioFileOptions.h +0 -35
- package/ios/audioapi/ios/core/IOSAudioFileOptions.mm +0 -135
- package/ios/audioapi/ios/core/IOSAudioFileWriter.h +0 -38
- package/ios/audioapi/ios/core/IOSAudioFileWriter.mm +0 -187
- package/lib/commonjs/utils/bitEnums.js +0 -33
- package/lib/commonjs/utils/bitEnums.js.map +0 -1
- package/lib/module/utils/bitEnums.js +0 -27
- package/lib/module/utils/bitEnums.js.map +0 -1
- package/lib/typescript/utils/bitEnums.d.ts +0 -4
- package/lib/typescript/utils/bitEnums.d.ts.map +0 -1
- package/src/utils/bitEnums.ts +0 -51
|
@@ -118,9 +118,9 @@ static AudioEngine *_sharedInstance = nil;
|
|
|
118
118
|
- (void)stopEngine
|
|
119
119
|
{
|
|
120
120
|
NSLog(@"[AudioEngine] stopEngine");
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
if (![self.audioEngine isRunning]) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
124
|
|
|
125
125
|
self.isSupposedToBeRunning = false;
|
|
126
126
|
[self.audioEngine stop];
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
@property (nonatomic, assign) AVAudioSessionCategory sessionCategory;
|
|
15
15
|
@property (nonatomic, assign) AVAudioSessionCategoryOptions sessionOptions;
|
|
16
16
|
@property (nonatomic, assign) bool allowHapticsAndSystemSoundsDuringRecording;
|
|
17
|
+
@property (nonatomic, assign) bool shouldManageSession;
|
|
17
18
|
|
|
18
19
|
- (instancetype)init;
|
|
19
20
|
- (void)cleanup;
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
options:(NSArray *)options
|
|
28
29
|
allowHaptics:(BOOL)allowHaptics;
|
|
29
30
|
- (bool)setActive:(bool)active;
|
|
31
|
+
- (void)disableSessionManagement;
|
|
30
32
|
|
|
31
33
|
- (void)requestRecordingPermissions:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject;
|
|
32
34
|
- (void)checkRecordingPermissions:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
self.allowHapticsAndSystemSoundsDuringRecording = false;
|
|
14
14
|
self.hasDirtySettings = true;
|
|
15
15
|
self.isActive = false;
|
|
16
|
+
self.shouldManageSession = true;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
return self;
|
|
@@ -135,6 +136,9 @@
|
|
|
135
136
|
|
|
136
137
|
- (bool)setActive:(bool)active
|
|
137
138
|
{
|
|
139
|
+
if (!self.shouldManageSession) {
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
138
142
|
if (active == self.isActive) {
|
|
139
143
|
return true;
|
|
140
144
|
}
|
|
@@ -162,6 +166,11 @@
|
|
|
162
166
|
|
|
163
167
|
- (bool)configureAudioSession
|
|
164
168
|
{
|
|
169
|
+
if (!self.shouldManageSession) {
|
|
170
|
+
NSLog(@"[AudioSessionManager] Skipping AVAudioSession configuration, shouldManageSession is false");
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
|
|
165
174
|
if (![self hasDirtySettings]) {
|
|
166
175
|
return true;
|
|
167
176
|
}
|
|
@@ -211,8 +220,23 @@
|
|
|
211
220
|
self.isActive = false;
|
|
212
221
|
}
|
|
213
222
|
|
|
223
|
+
- (void)disableSessionManagement
|
|
224
|
+
{
|
|
225
|
+
self.shouldManageSession = false;
|
|
226
|
+
self.hasDirtySettings = false;
|
|
227
|
+
}
|
|
228
|
+
|
|
214
229
|
- (void)requestRecordingPermissions:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject
|
|
215
230
|
{
|
|
231
|
+
id value = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSMicrophoneUsageDescription"];
|
|
232
|
+
// if there is no entry NSMicrophoneUsageDescription calling requestRecordPermission will quit an app
|
|
233
|
+
if (value == nil) {
|
|
234
|
+
reject(
|
|
235
|
+
nil,
|
|
236
|
+
@"There is no NSMicrophoneUsageDescription entry in info.plist file. App cannot access microphone without it.",
|
|
237
|
+
nil);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
216
240
|
if (@available(iOS 17, *)) {
|
|
217
241
|
[AVAudioSession.sharedInstance requestRecordPermission:^(BOOL granted) {
|
|
218
242
|
if (granted) {
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
@property (nonatomic, weak) MPNowPlayingInfoCenter *playingInfoCenter;
|
|
14
14
|
@property (nonatomic, copy) NSString *artworkUrl;
|
|
15
|
-
@property (nonatomic, assign) bool isReceivingRemoteCommands;
|
|
16
15
|
|
|
17
16
|
- (instancetype)initWithAudioAPIModule:(AudioAPIModule *)audioAPIModule;
|
|
18
17
|
- (void)cleanup;
|
|
@@ -19,40 +19,28 @@
|
|
|
19
19
|
if (self = [super init]) {
|
|
20
20
|
self.audioAPIModule = audioAPIModule;
|
|
21
21
|
self.playingInfoCenter = [MPNowPlayingInfoCenter defaultCenter];
|
|
22
|
-
self.isReceivingRemoteCommands = false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return self;
|
|
26
|
-
}
|
|
27
22
|
|
|
28
|
-
- (void)toggleRemoteCommands:(bool)enable
|
|
29
|
-
{
|
|
30
|
-
if (enable && !self.isReceivingRemoteCommands) {
|
|
31
|
-
self.isReceivingRemoteCommands = true;
|
|
32
23
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
33
24
|
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
|
|
34
25
|
});
|
|
35
|
-
return;
|
|
36
|
-
} else if (!enable && self.isReceivingRemoteCommands) {
|
|
37
|
-
self.isReceivingRemoteCommands = false;
|
|
38
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
39
|
-
[[UIApplication sharedApplication] endReceivingRemoteControlEvents];
|
|
40
|
-
});
|
|
41
|
-
return;
|
|
42
26
|
}
|
|
27
|
+
|
|
28
|
+
return self;
|
|
43
29
|
}
|
|
44
30
|
|
|
45
31
|
- (void)cleanup
|
|
46
32
|
{
|
|
47
33
|
NSLog(@"[LockScreenManager] cleanup");
|
|
48
|
-
[self toggleRemoteCommands:false];
|
|
49
34
|
[self resetLockScreenInfo];
|
|
35
|
+
|
|
36
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
37
|
+
[[UIApplication sharedApplication] endReceivingRemoteControlEvents];
|
|
38
|
+
});
|
|
50
39
|
}
|
|
51
40
|
|
|
52
41
|
- (void)setLockScreenInfo:(NSDictionary *)info
|
|
53
42
|
{
|
|
54
43
|
self.playingInfoCenter = [MPNowPlayingInfoCenter defaultCenter];
|
|
55
|
-
[self toggleRemoteCommands:true];
|
|
56
44
|
|
|
57
45
|
// now playing info(lock screen info)
|
|
58
46
|
NSMutableDictionary *lockScreenInfoDict;
|
|
@@ -91,7 +79,6 @@
|
|
|
91
79
|
|
|
92
80
|
- (void)resetLockScreenInfo
|
|
93
81
|
{
|
|
94
|
-
[self toggleRemoteCommands:false];
|
|
95
82
|
self.playingInfoCenter = [MPNowPlayingInfoCenter defaultCenter];
|
|
96
83
|
self.playingInfoCenter.nowPlayingInfo = nil;
|
|
97
84
|
self.artworkUrl = nil;
|
package/lib/commonjs/api.js
CHANGED
|
@@ -3,35 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
AnalyserNode: true,
|
|
8
|
-
AudioBuffer: true,
|
|
9
|
-
AudioBufferQueueSourceNode: true,
|
|
10
|
-
AudioBufferSourceNode: true,
|
|
11
|
-
AudioContext: true,
|
|
12
|
-
decodeAudioData: true,
|
|
13
|
-
decodePCMInBase64: true,
|
|
14
|
-
AudioDestinationNode: true,
|
|
15
|
-
AudioNode: true,
|
|
16
|
-
AudioParam: true,
|
|
17
|
-
AudioRecorder: true,
|
|
18
|
-
AudioScheduledSourceNode: true,
|
|
19
|
-
changePlaybackSpeed: true,
|
|
20
|
-
BaseAudioContext: true,
|
|
21
|
-
BiquadFilterNode: true,
|
|
22
|
-
ConstantSourceNode: true,
|
|
23
|
-
GainNode: true,
|
|
24
|
-
OfflineAudioContext: true,
|
|
25
|
-
OscillatorNode: true,
|
|
26
|
-
RecorderAdapterNode: true,
|
|
27
|
-
StereoPannerNode: true,
|
|
28
|
-
StreamerNode: true,
|
|
29
|
-
WorkletNode: true,
|
|
30
|
-
WorkletProcessingNode: true,
|
|
31
|
-
WorkletSourceNode: true,
|
|
32
|
-
useSystemVolume: true,
|
|
33
|
-
AudioManager: true
|
|
34
|
-
};
|
|
35
6
|
Object.defineProperty(exports, "AnalyserNode", {
|
|
36
7
|
enumerable: true,
|
|
37
8
|
get: function () {
|
|
@@ -98,6 +69,12 @@ Object.defineProperty(exports, "AudioScheduledSourceNode", {
|
|
|
98
69
|
return _AudioScheduledSourceNode.default;
|
|
99
70
|
}
|
|
100
71
|
});
|
|
72
|
+
Object.defineProperty(exports, "AudioWorkletRuntime", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _types.AudioWorkletRuntime;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
101
78
|
Object.defineProperty(exports, "BaseAudioContext", {
|
|
102
79
|
enumerable: true,
|
|
103
80
|
get: function () {
|
|
@@ -110,18 +87,102 @@ Object.defineProperty(exports, "BiquadFilterNode", {
|
|
|
110
87
|
return _BiquadFilterNode.default;
|
|
111
88
|
}
|
|
112
89
|
});
|
|
90
|
+
Object.defineProperty(exports, "BiquadFilterType", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _types.BiquadFilterType;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "ChannelCountMode", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _types.ChannelCountMode;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "ChannelInterpretation", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _types.ChannelInterpretation;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
113
108
|
Object.defineProperty(exports, "ConstantSourceNode", {
|
|
114
109
|
enumerable: true,
|
|
115
110
|
get: function () {
|
|
116
111
|
return _ConstantSourceNode.default;
|
|
117
112
|
}
|
|
118
113
|
});
|
|
114
|
+
Object.defineProperty(exports, "ContextState", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _types.ContextState;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "ConvolverNode", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _ConvolverNode.default;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
119
126
|
Object.defineProperty(exports, "GainNode", {
|
|
120
127
|
enumerable: true,
|
|
121
128
|
get: function () {
|
|
122
129
|
return _GainNode.default;
|
|
123
130
|
}
|
|
124
131
|
});
|
|
132
|
+
Object.defineProperty(exports, "IOSCategory", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _types2.IOSCategory;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(exports, "IOSMode", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function () {
|
|
141
|
+
return _types2.IOSMode;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "IOSOption", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _types2.IOSOption;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(exports, "IndexSizeError", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function () {
|
|
153
|
+
return _errors.IndexSizeError;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "InvalidAccessError", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () {
|
|
159
|
+
return _errors.InvalidAccessError;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
Object.defineProperty(exports, "InvalidStateError", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function () {
|
|
165
|
+
return _errors.InvalidStateError;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(exports, "LockScreenInfo", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () {
|
|
171
|
+
return _types2.LockScreenInfo;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
Object.defineProperty(exports, "MediaState", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function () {
|
|
177
|
+
return _types2.MediaState;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(exports, "NotSupportedError", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function () {
|
|
183
|
+
return _errors.NotSupportedError;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
125
186
|
Object.defineProperty(exports, "OfflineAudioContext", {
|
|
126
187
|
enumerable: true,
|
|
127
188
|
get: function () {
|
|
@@ -134,12 +195,42 @@ Object.defineProperty(exports, "OscillatorNode", {
|
|
|
134
195
|
return _OscillatorNode.default;
|
|
135
196
|
}
|
|
136
197
|
});
|
|
198
|
+
Object.defineProperty(exports, "OscillatorType", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function () {
|
|
201
|
+
return _types.OscillatorType;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "PeriodicWaveConstraints", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function () {
|
|
207
|
+
return _types.PeriodicWaveConstraints;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "PermissionStatus", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function () {
|
|
213
|
+
return _types2.PermissionStatus;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "RangeError", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function () {
|
|
219
|
+
return _errors.RangeError;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
137
222
|
Object.defineProperty(exports, "RecorderAdapterNode", {
|
|
138
223
|
enumerable: true,
|
|
139
224
|
get: function () {
|
|
140
225
|
return _RecorderAdapterNode.default;
|
|
141
226
|
}
|
|
142
227
|
});
|
|
228
|
+
Object.defineProperty(exports, "SessionOptions", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () {
|
|
231
|
+
return _types2.SessionOptions;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
143
234
|
Object.defineProperty(exports, "StereoPannerNode", {
|
|
144
235
|
enumerable: true,
|
|
145
236
|
get: function () {
|
|
@@ -152,6 +243,12 @@ Object.defineProperty(exports, "StreamerNode", {
|
|
|
152
243
|
return _StreamerNode.default;
|
|
153
244
|
}
|
|
154
245
|
});
|
|
246
|
+
Object.defineProperty(exports, "WindowType", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function () {
|
|
249
|
+
return _types.WindowType;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
155
252
|
Object.defineProperty(exports, "WorkletNode", {
|
|
156
253
|
enumerable: true,
|
|
157
254
|
get: function () {
|
|
@@ -195,68 +292,36 @@ Object.defineProperty(exports, "useSystemVolume", {
|
|
|
195
292
|
}
|
|
196
293
|
});
|
|
197
294
|
var _specs = require("./specs");
|
|
198
|
-
var
|
|
295
|
+
var _WorkletNode = _interopRequireDefault(require("./core/WorkletNode"));
|
|
296
|
+
var _WorkletSourceNode = _interopRequireDefault(require("./core/WorkletSourceNode"));
|
|
297
|
+
var _WorkletProcessingNode = _interopRequireDefault(require("./core/WorkletProcessingNode"));
|
|
298
|
+
var _RecorderAdapterNode = _interopRequireDefault(require("./core/RecorderAdapterNode"));
|
|
199
299
|
var _AudioBuffer = _interopRequireDefault(require("./core/AudioBuffer"));
|
|
200
|
-
var _AudioBufferQueueSourceNode = _interopRequireDefault(require("./core/AudioBufferQueueSourceNode"));
|
|
201
300
|
var _AudioBufferSourceNode = _interopRequireDefault(require("./core/AudioBufferSourceNode"));
|
|
301
|
+
var _AudioBufferQueueSourceNode = _interopRequireDefault(require("./core/AudioBufferQueueSourceNode"));
|
|
202
302
|
var _AudioContext = _interopRequireDefault(require("./core/AudioContext"));
|
|
203
|
-
var
|
|
303
|
+
var _OfflineAudioContext = _interopRequireDefault(require("./core/OfflineAudioContext"));
|
|
204
304
|
var _AudioDestinationNode = _interopRequireDefault(require("./core/AudioDestinationNode"));
|
|
205
305
|
var _AudioNode = _interopRequireDefault(require("./core/AudioNode"));
|
|
306
|
+
var _AnalyserNode = _interopRequireDefault(require("./core/AnalyserNode"));
|
|
206
307
|
var _AudioParam = _interopRequireDefault(require("./core/AudioParam"));
|
|
207
|
-
var _AudioRecorder = _interopRequireDefault(require("./core/AudioRecorder"));
|
|
208
308
|
var _AudioScheduledSourceNode = _interopRequireDefault(require("./core/AudioScheduledSourceNode"));
|
|
209
|
-
var _AudioStretcher = _interopRequireDefault(require("./core/AudioStretcher"));
|
|
210
309
|
var _BaseAudioContext = _interopRequireDefault(require("./core/BaseAudioContext"));
|
|
211
310
|
var _BiquadFilterNode = _interopRequireDefault(require("./core/BiquadFilterNode"));
|
|
212
|
-
var _ConstantSourceNode = _interopRequireDefault(require("./core/ConstantSourceNode"));
|
|
213
311
|
var _GainNode = _interopRequireDefault(require("./core/GainNode"));
|
|
214
|
-
var _OfflineAudioContext = _interopRequireDefault(require("./core/OfflineAudioContext"));
|
|
215
312
|
var _OscillatorNode = _interopRequireDefault(require("./core/OscillatorNode"));
|
|
216
|
-
var _RecorderAdapterNode = _interopRequireDefault(require("./core/RecorderAdapterNode"));
|
|
217
313
|
var _StereoPannerNode = _interopRequireDefault(require("./core/StereoPannerNode"));
|
|
314
|
+
var _AudioRecorder = _interopRequireDefault(require("./core/AudioRecorder"));
|
|
218
315
|
var _StreamerNode = _interopRequireDefault(require("./core/StreamerNode"));
|
|
219
|
-
var
|
|
220
|
-
var _WorkletProcessingNode = _interopRequireDefault(require("./core/WorkletProcessingNode"));
|
|
221
|
-
var _WorkletSourceNode = _interopRequireDefault(require("./core/WorkletSourceNode"));
|
|
222
|
-
var _useSystemVolume = _interopRequireDefault(require("./hooks/useSystemVolume"));
|
|
316
|
+
var _ConstantSourceNode = _interopRequireDefault(require("./core/ConstantSourceNode"));
|
|
223
317
|
var _system = _interopRequireDefault(require("./system"));
|
|
318
|
+
var _ConvolverNode = _interopRequireDefault(require("./core/ConvolverNode"));
|
|
319
|
+
var _useSystemVolume = _interopRequireDefault(require("./hooks/useSystemVolume"));
|
|
320
|
+
var _AudioDecoder = require("./core/AudioDecoder");
|
|
321
|
+
var _AudioStretcher = _interopRequireDefault(require("./core/AudioStretcher"));
|
|
322
|
+
var _types = require("./types");
|
|
323
|
+
var _types2 = require("./system/types");
|
|
224
324
|
var _errors = require("./errors");
|
|
225
|
-
Object.keys(_errors).forEach(function (key) {
|
|
226
|
-
if (key === "default" || key === "__esModule") return;
|
|
227
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
228
|
-
if (key in exports && exports[key] === _errors[key]) return;
|
|
229
|
-
Object.defineProperty(exports, key, {
|
|
230
|
-
enumerable: true,
|
|
231
|
-
get: function () {
|
|
232
|
-
return _errors[key];
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
var _types = require("./system/types");
|
|
237
|
-
Object.keys(_types).forEach(function (key) {
|
|
238
|
-
if (key === "default" || key === "__esModule") return;
|
|
239
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
240
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
241
|
-
Object.defineProperty(exports, key, {
|
|
242
|
-
enumerable: true,
|
|
243
|
-
get: function () {
|
|
244
|
-
return _types[key];
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
});
|
|
248
|
-
var _types2 = require("./types");
|
|
249
|
-
Object.keys(_types2).forEach(function (key) {
|
|
250
|
-
if (key === "default" || key === "__esModule") return;
|
|
251
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
252
|
-
if (key in exports && exports[key] === _types2[key]) return;
|
|
253
|
-
Object.defineProperty(exports, key, {
|
|
254
|
-
enumerable: true,
|
|
255
|
-
get: function () {
|
|
256
|
-
return _types2[key];
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
325
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
261
326
|
/* eslint-disable no-var */
|
|
262
327
|
|
package/lib/commonjs/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_specs","require","
|
|
1
|
+
{"version":3,"names":["_specs","require","_WorkletNode","_interopRequireDefault","_WorkletSourceNode","_WorkletProcessingNode","_RecorderAdapterNode","_AudioBuffer","_AudioBufferSourceNode","_AudioBufferQueueSourceNode","_AudioContext","_OfflineAudioContext","_AudioDestinationNode","_AudioNode","_AnalyserNode","_AudioParam","_AudioScheduledSourceNode","_BaseAudioContext","_BiquadFilterNode","_GainNode","_OscillatorNode","_StereoPannerNode","_AudioRecorder","_StreamerNode","_ConstantSourceNode","_system","_ConvolverNode","_useSystemVolume","_AudioDecoder","_AudioStretcher","_types","_types2","_errors","e","__esModule","default","global","createAudioContext","createOfflineAudioContext","createAudioRecorder","createAudioDecoder","createAudioStretcher","AudioEventEmitter","NativeAudioAPIModule","Error","install"],"sourceRoot":"../../src","sources":["api.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAsDA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,sBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,oBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,YAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,sBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,2BAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,aAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,oBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,qBAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,UAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,aAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,WAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,yBAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,iBAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,iBAAA,GAAAf,sBAAA,CAAAF,OAAA;AACA,IAAAkB,SAAA,GAAAhB,sBAAA,CAAAF,OAAA;AACA,IAAAmB,eAAA,GAAAjB,sBAAA,CAAAF,OAAA;AACA,IAAAoB,iBAAA,GAAAlB,sBAAA,CAAAF,OAAA;AACA,IAAAqB,cAAA,GAAAnB,sBAAA,CAAAF,OAAA;AACA,IAAAsB,aAAA,GAAApB,sBAAA,CAAAF,OAAA;AACA,IAAAuB,mBAAA,GAAArB,sBAAA,CAAAF,OAAA;AACA,IAAAwB,OAAA,GAAAtB,sBAAA,CAAAF,OAAA;AACA,IAAAyB,cAAA,GAAAvB,sBAAA,CAAAF,OAAA;AACA,IAAA0B,gBAAA,GAAAxB,sBAAA,CAAAF,OAAA;AACA,IAAA2B,aAAA,GAAA3B,OAAA;AACA,IAAA4B,eAAA,GAAA1B,sBAAA,CAAAF,OAAA;AAEA,IAAA6B,MAAA,GAAA7B,OAAA;AAWA,IAAA8B,OAAA,GAAA9B,OAAA;AAUA,IAAA+B,OAAA,GAAA/B,OAAA;AAMkB,SAAAE,uBAAA8B,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAlGlB;;AAwBA;;AAEA,IACEG,MAAM,CAACC,kBAAkB,IAAI,IAAI,IACjCD,MAAM,CAACE,yBAAyB,IAAI,IAAI,IACxCF,MAAM,CAACG,mBAAmB,IAAI,IAAI,IAClCH,MAAM,CAACI,kBAAkB,IAAI,IAAI,IACjCJ,MAAM,CAACK,oBAAoB,IAAI,IAAI,IACnCL,MAAM,CAACM,iBAAiB,IAAI,IAAI,EAChC;EACA,IAAI,CAACC,2BAAoB,EAAE;IACzB,MAAM,IAAIC,KAAK,CACb,iFACF,CAAC;EACH;EAEAD,2BAAoB,CAACE,OAAO,CAAC,CAAC;AAChC","ignoreList":[]}
|
package/lib/commonjs/api.web.js
CHANGED
|
@@ -19,6 +19,7 @@ var _exportNames = {
|
|
|
19
19
|
OscillatorNode: true,
|
|
20
20
|
StereoPannerNode: true,
|
|
21
21
|
ConstantSourceNode: true,
|
|
22
|
+
ConvolverNode: true,
|
|
22
23
|
OscillatorType: true,
|
|
23
24
|
BiquadFilterType: true,
|
|
24
25
|
ChannelCountMode: true,
|
|
@@ -129,6 +130,12 @@ Object.defineProperty(exports, "ContextState", {
|
|
|
129
130
|
return _types.ContextState;
|
|
130
131
|
}
|
|
131
132
|
});
|
|
133
|
+
Object.defineProperty(exports, "ConvolverNode", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () {
|
|
136
|
+
return _ConvolverNode.default;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
132
139
|
Object.defineProperty(exports, "GainNode", {
|
|
133
140
|
enumerable: true,
|
|
134
141
|
get: function () {
|
|
@@ -258,6 +265,7 @@ var _GainNode = _interopRequireDefault(require("./web-core/GainNode"));
|
|
|
258
265
|
var _OscillatorNode = _interopRequireDefault(require("./web-core/OscillatorNode"));
|
|
259
266
|
var _StereoPannerNode = _interopRequireDefault(require("./web-core/StereoPannerNode"));
|
|
260
267
|
var _ConstantSourceNode = _interopRequireDefault(require("./web-core/ConstantSourceNode"));
|
|
268
|
+
var _ConvolverNode = _interopRequireDefault(require("./web-core/ConvolverNode"));
|
|
261
269
|
var _custom = require("./web-core/custom");
|
|
262
270
|
Object.keys(_custom).forEach(function (key) {
|
|
263
271
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_AudioBuffer","_interopRequireDefault","require","_AudioBufferSourceNode","_AudioContext","_OfflineAudioContext","_AudioDestinationNode","_AudioNode","_AnalyserNode","_AudioParam","_AudioScheduledSourceNode","_BaseAudioContext","_BiquadFilterNode","_GainNode","_OscillatorNode","_StereoPannerNode","_ConstantSourceNode","_custom","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_types","_types2","_errors","e","__esModule","default"],"sourceRoot":"../../src","sources":["api.web.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_AudioBuffer","_interopRequireDefault","require","_AudioBufferSourceNode","_AudioContext","_OfflineAudioContext","_AudioDestinationNode","_AudioNode","_AnalyserNode","_AudioParam","_AudioScheduledSourceNode","_BaseAudioContext","_BiquadFilterNode","_GainNode","_OscillatorNode","_StereoPannerNode","_ConstantSourceNode","_ConvolverNode","_custom","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_types","_types2","_errors","e","__esModule","default"],"sourceRoot":"../../src","sources":["api.web.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,oBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,qBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,UAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,aAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,WAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,yBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,iBAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,iBAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,SAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,eAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,iBAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,mBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,cAAA,GAAAhB,sBAAA,CAAAC,OAAA;AAEA,IAAAgB,OAAA,GAAAhB,OAAA;AAAAiB,MAAA,CAAAC,IAAA,CAAAF,OAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,OAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAS,MAAA,GAAA7B,OAAA;AAUA,IAAA8B,OAAA,GAAA9B,OAAA;AAUA,IAAA+B,OAAA,GAAA/B,OAAA;AAMkB,SAAAD,uBAAAiC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
|
@@ -15,7 +15,7 @@ class AudioContext extends _BaseAudioContext.default {
|
|
|
15
15
|
throw new _errors.NotSupportedError(`The provided sampleRate is not supported: ${options.sampleRate}`);
|
|
16
16
|
}
|
|
17
17
|
let audioRuntime = null;
|
|
18
|
-
if (_utils.
|
|
18
|
+
if (_utils.isWorkletsVersionSupported) {
|
|
19
19
|
audioRuntime = _utils.workletsModule.createWorkletRuntime('AudioWorkletRuntime');
|
|
20
20
|
}
|
|
21
21
|
super(global.createAudioContext(options?.sampleRate || _system.default.getDevicePreferredSampleRate(), options?.initSuspended || false, audioRuntime));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_BaseAudioContext","_interopRequireDefault","require","_system","_errors","_utils","e","__esModule","default","AudioContext","BaseAudioContext","constructor","options","sampleRate","NotSupportedError","audioRuntime","
|
|
1
|
+
{"version":3,"names":["_BaseAudioContext","_interopRequireDefault","require","_system","_errors","_utils","e","__esModule","default","AudioContext","BaseAudioContext","constructor","options","sampleRate","NotSupportedError","audioRuntime","isWorkletsVersionSupported","workletsModule","createWorkletRuntime","global","createAudioContext","AudioManager","getDevicePreferredSampleRate","initSuspended","close","context","resume","suspend","exports"],"sourceRoot":"../../../src","sources":["core/AudioContext.ts"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAsE,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvD,MAAMG,YAAY,SAASC,yBAAgB,CAAC;EACzDC,WAAWA,CAACC,OAA6B,EAAE;IACzC,IACEA,OAAO,IACPA,OAAO,CAACC,UAAU,KACjBD,OAAO,CAACC,UAAU,GAAG,IAAI,IAAID,OAAO,CAACC,UAAU,GAAG,KAAK,CAAC,EACzD;MACA,MAAM,IAAIC,yBAAiB,CACzB,6CAA6CF,OAAO,CAACC,UAAU,EACjE,CAAC;IACH;IACA,IAAIE,YAAY,GAAG,IAAI;IAEvB,IAAIC,iCAA0B,EAAE;MAC9BD,YAAY,GAAGE,qBAAc,CAACC,oBAAoB,CAAC,qBAAqB,CAAC;IAC3E;IAEA,KAAK,CACHC,MAAM,CAACC,kBAAkB,CACvBR,OAAO,EAAEC,UAAU,IAAIQ,eAAY,CAACC,4BAA4B,CAAC,CAAC,EAClEV,OAAO,EAAEW,aAAa,IAAI,KAAK,EAC/BR,YACF,CACF,CAAC;EACH;EAEA,MAAMS,KAAKA,CAAA,EAAkB;IAC3B,OAAQ,IAAI,CAACC,OAAO,CAAmBD,KAAK,CAAC,CAAC;EAChD;EAEA,MAAME,MAAMA,CAAA,EAAqB;IAC/B,OAAQ,IAAI,CAACD,OAAO,CAAmBC,MAAM,CAAC,CAAC;EACjD;EAEA,MAAMC,OAAOA,CAAA,EAAqB;IAChC,OAAQ,IAAI,CAACF,OAAO,CAAmBE,OAAO,CAAC,CAAC;EAClD;AACF;AAACC,OAAA,CAAApB,OAAA,GAAAC,YAAA","ignoreList":[]}
|