react-native-audio-api 0.11.0-alpha.1 → 0.11.0-nightly-9f40b78-20251108
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 -142
- package/android/src/main/cpp/audioapi/android/core/AndroidAudioRecorder.h +13 -40
- 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/AudioContextHostObject.cpp +12 -17
- package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.cpp +18 -0
- package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.h +1 -0
- package/common/cpp/audioapi/HostObjects/OfflineAudioContextHostObject.cpp +26 -30
- 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 -97
- package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.h +6 -18
- 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/HostObjects/utils/AudioStretcherHostObject.cpp +15 -26
- 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 +82 -36
- package/common/cpp/audioapi/core/inputs/AudioRecorder.h +31 -52
- 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/AudioBufferQueueSourceNode.cpp +7 -0
- package/common/cpp/audioapi/core/sources/AudioBufferQueueSourceNode.h +1 -0
- 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 -19
- package/common/cpp/audioapi/core/sources/AudioScheduledSourceNode.h +3 -3
- 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/jsi/JsiPromise.cpp +33 -56
- package/common/cpp/audioapi/jsi/JsiPromise.h +41 -11
- 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 +34 -9
- package/ios/audioapi/ios/core/IOSAudioRecorder.h +10 -28
- package/ios/audioapi/ios/core/IOSAudioRecorder.mm +30 -117
- package/ios/audioapi/ios/core/NativeAudioRecorder.h +9 -4
- package/ios/audioapi/ios/core/NativeAudioRecorder.m +71 -29
- package/ios/audioapi/ios/core/utils/AudioDecoder.mm +0 -1
- 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 +13 -171
- 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 +13 -171
- 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 +7 -62
- 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 +9 -42
- 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 -79
- 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 +24 -211
- 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 +16 -52
- package/src/specs/NativeAudioAPIModule.ts +1 -0
- package/src/system/AudioManager.ts +4 -0
- package/src/types.ts +9 -90
- 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 -37
- package/android/src/main/cpp/audioapi/android/core/utils/AndroidRecorderCallback.cpp +0 -187
- package/android/src/main/cpp/audioapi/android/core/utils/AndroidRecorderCallback.h +0 -57
- 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 -429
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegFileWriter.h +0 -113
- 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 -269
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileWriter.h +0 -47
- 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 -36
- package/ios/audioapi/ios/core/IOSAudioFileOptions.mm +0 -140
- package/ios/audioapi/ios/core/IOSAudioFileWriter.h +0 -51
- package/ios/audioapi/ios/core/IOSAudioFileWriter.mm +0 -223
- package/ios/audioapi/ios/core/IOSRecorderCallback.h +0 -57
- package/ios/audioapi/ios/core/IOSRecorderCallback.mm +0 -189
- 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
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// implementation of linear convolution algorithm described in this paper:
|
|
2
|
+
// https://publications.rwth-aachen.de/record/466561/files/466561.pdf page 110
|
|
3
|
+
|
|
4
|
+
#if defined(__ARM_NEON)
|
|
5
|
+
#include <arm_neon.h>
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#include <audioapi/core/sources/AudioBuffer.h>
|
|
9
|
+
#include <audioapi/dsp/Convolver.h>
|
|
10
|
+
#include <audioapi/dsp/VectorMath.h>
|
|
11
|
+
#include <audioapi/utils/AudioArray.h>
|
|
12
|
+
#include <chrono>
|
|
13
|
+
#include <iostream>
|
|
14
|
+
|
|
15
|
+
namespace audioapi {
|
|
16
|
+
|
|
17
|
+
Convolver::Convolver()
|
|
18
|
+
: _blockSize(0),
|
|
19
|
+
_segSize(0),
|
|
20
|
+
_segCount(0),
|
|
21
|
+
_fftComplexSize(0),
|
|
22
|
+
_segments(),
|
|
23
|
+
_segmentsIR(),
|
|
24
|
+
_fftBuffer(0),
|
|
25
|
+
_fft(nullptr),
|
|
26
|
+
_preMultiplied(),
|
|
27
|
+
_current(0),
|
|
28
|
+
_inputBuffer(0) {}
|
|
29
|
+
|
|
30
|
+
void Convolver::reset() {
|
|
31
|
+
_blockSize = 0;
|
|
32
|
+
_segSize = 0;
|
|
33
|
+
_segCount = 0;
|
|
34
|
+
_fftComplexSize = 0;
|
|
35
|
+
_current = 0;
|
|
36
|
+
_fft = nullptr;
|
|
37
|
+
_segments.clear();
|
|
38
|
+
_segmentsIR.clear();
|
|
39
|
+
_preMultiplied.clear();
|
|
40
|
+
_fftBuffer.zero();
|
|
41
|
+
_inputBuffer.zero();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
bool Convolver::init(
|
|
45
|
+
size_t blockSize,
|
|
46
|
+
const audioapi::AudioArray &ir,
|
|
47
|
+
size_t irLen) {
|
|
48
|
+
reset();
|
|
49
|
+
// blockSize must be a power of two
|
|
50
|
+
if ((blockSize & (blockSize - 1))) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Ignore zeros at the end of the impulse response because they only waste
|
|
55
|
+
// computation time
|
|
56
|
+
_blockSize = blockSize;
|
|
57
|
+
_trueSegmentCount = (size_t)(std::ceil((float)irLen / (float)_blockSize));
|
|
58
|
+
while (irLen > 0 && ::fabs(ir[irLen - 1]) < 10e-3) {
|
|
59
|
+
--irLen;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (irLen == 0) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// The length-N is split into P = N/B length-B sub filters
|
|
67
|
+
_segCount = (size_t)(std::ceil((float)irLen / (float)_blockSize));
|
|
68
|
+
_segSize = 2 * _blockSize;
|
|
69
|
+
// size of the FFT is 2B, so the complex size is B+1, due to the
|
|
70
|
+
// complex-conjugate symmetricity
|
|
71
|
+
_fftComplexSize = _segSize / 2 + 1;
|
|
72
|
+
_fft = std::make_shared<dsp::FFT>((int)_segSize);
|
|
73
|
+
_fftBuffer.resize(_segSize);
|
|
74
|
+
|
|
75
|
+
// segments preparation
|
|
76
|
+
for (int i = 0; i < _segCount; ++i) {
|
|
77
|
+
aligned_vec_complex vec(_fftComplexSize, std::complex<float>(0.0f, 0.0f));
|
|
78
|
+
_segments.push_back(vec);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ir preparation
|
|
82
|
+
for (int i = 0; i < _segCount; ++i) {
|
|
83
|
+
aligned_vec_complex segment(_fftComplexSize);
|
|
84
|
+
const size_t remainingSamples = irLen - (i * _blockSize);
|
|
85
|
+
const size_t samplesToCopy = std::min(_blockSize, remainingSamples);
|
|
86
|
+
|
|
87
|
+
if (samplesToCopy > 0) {
|
|
88
|
+
memcpy(
|
|
89
|
+
_fftBuffer.getData(),
|
|
90
|
+
ir.getData() + i * _blockSize,
|
|
91
|
+
samplesToCopy * sizeof(float));
|
|
92
|
+
}
|
|
93
|
+
// Each sub filter is zero-padded to length 2B and transformed using a
|
|
94
|
+
// 2B-point real-to-complex FFT.
|
|
95
|
+
memset(_fftBuffer.getData() + _blockSize, 0, _blockSize * sizeof(float));
|
|
96
|
+
_fft->doFFT(_fftBuffer.getData(), segment);
|
|
97
|
+
segment.at(0).imag(0.0f); // ensure DC component is real
|
|
98
|
+
_segmentsIR.push_back(segment);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
_preMultiplied = aligned_vec_complex(_fftComplexSize);
|
|
102
|
+
_inputBuffer.resize(_segSize);
|
|
103
|
+
_current = 0;
|
|
104
|
+
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/// @brief Fast pairwise complex multiplication using ARM NEON intrinsics
|
|
109
|
+
/// @param ir Impulse response
|
|
110
|
+
/// @param audio Input audio signal
|
|
111
|
+
/// @param pre Output buffer for pre-multiplied results
|
|
112
|
+
/// @note IMPORTANT: ir, audio, and pre must be the same size and should be
|
|
113
|
+
/// aligned to 16 bytes for optimal performance
|
|
114
|
+
void pairwise_complex_multiply_fast(
|
|
115
|
+
const Convolver::aligned_vec_complex &ir,
|
|
116
|
+
const Convolver::aligned_vec_complex &audio,
|
|
117
|
+
Convolver::aligned_vec_complex &pre) {
|
|
118
|
+
size_t n = ir.size();
|
|
119
|
+
|
|
120
|
+
/// @note Using ARM NEON intrinsics for SIMD optimization
|
|
121
|
+
/// This implementation is on average 2x faster than the scalar version on ARM
|
|
122
|
+
/// architectures With 16-byte alignment it can be even faster up to 2.5x
|
|
123
|
+
#ifdef __ARM_NEON
|
|
124
|
+
size_t j = 0;
|
|
125
|
+
|
|
126
|
+
// Main vector loop: process 4 complex samples (8 floats) per iteration using
|
|
127
|
+
// vld2q/vst2q deinterleave
|
|
128
|
+
for (; j <= n - 4; j += 4) {
|
|
129
|
+
// load de-interleaved real/imag for 4 complex values
|
|
130
|
+
float32x4x2_t ir_de = vld2q_f32(reinterpret_cast<const float *>(&ir[j]));
|
|
131
|
+
float32x4x2_t a_de = vld2q_f32(reinterpret_cast<const float *>(&audio[j]));
|
|
132
|
+
float32x4x2_t pre_de = vld2q_f32(reinterpret_cast<float *>(&pre[j]));
|
|
133
|
+
|
|
134
|
+
float32x4_t ir_re = ir_de.val[0];
|
|
135
|
+
float32x4_t ir_im = ir_de.val[1];
|
|
136
|
+
float32x4_t a_re = a_de.val[0];
|
|
137
|
+
float32x4_t a_im = a_de.val[1];
|
|
138
|
+
|
|
139
|
+
// real = ir_re * a_re - ir_im * a_im
|
|
140
|
+
float32x4_t real = vmulq_f32(ir_re, a_re);
|
|
141
|
+
real = vmlsq_f32(real, ir_im, a_im);
|
|
142
|
+
// imag = ir_re * a_im + ir_im * a_re
|
|
143
|
+
float32x4_t imag = vmulq_f32(ir_re, a_im);
|
|
144
|
+
imag = vmlaq_f32(imag, ir_im, a_re);
|
|
145
|
+
|
|
146
|
+
// accumulate into pre
|
|
147
|
+
float32x4_t new_re = vaddq_f32(pre_de.val[0], real);
|
|
148
|
+
float32x4_t new_im = vaddq_f32(pre_de.val[1], imag);
|
|
149
|
+
|
|
150
|
+
float32x4x2_t out_de;
|
|
151
|
+
out_de.val[0] = new_re;
|
|
152
|
+
out_de.val[1] = new_im;
|
|
153
|
+
|
|
154
|
+
vst2q_f32(reinterpret_cast<float *>(&pre[j]), out_de);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Tail
|
|
158
|
+
for (; j < n; ++j) {
|
|
159
|
+
pre[j] += ir[j] * audio[j];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
#else
|
|
163
|
+
// Fallback scalar implementation
|
|
164
|
+
for (size_t i = 0; i < n; ++i) {
|
|
165
|
+
pre[i] += ir[i] * audio[i];
|
|
166
|
+
}
|
|
167
|
+
#endif
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
void Convolver::process(float *data, float *outputData) {
|
|
171
|
+
// The input buffer acts as a 2B-point sliding window of the input signal.
|
|
172
|
+
// With each new input block, the right half of the input buffer is shifted
|
|
173
|
+
// to the left and the new block is stored in the right half.
|
|
174
|
+
memmove(
|
|
175
|
+
_inputBuffer.getData(),
|
|
176
|
+
_inputBuffer.getData() + _blockSize,
|
|
177
|
+
_blockSize * sizeof(float));
|
|
178
|
+
memcpy(_inputBuffer.getData() + _blockSize, data, _blockSize * sizeof(float));
|
|
179
|
+
|
|
180
|
+
// All contents (DFT spectra) in the FDL are shifted up by one slot.
|
|
181
|
+
_current = (_current > 0) ? _current - 1 : _segCount - 1;
|
|
182
|
+
// A 2B-point real-to-complex FFT is computed from the input buffer,
|
|
183
|
+
// resulting in B+1 complex-conjugate symmetric DFT coefficients. The
|
|
184
|
+
// result is stored in the first FDL slot.
|
|
185
|
+
// _current marks first FDL slot, which is the current input block.
|
|
186
|
+
_fft->doFFT(_inputBuffer.getData(), _segments[_current]);
|
|
187
|
+
_segments[_current][0].imag(0.0f); // ensure DC component is real
|
|
188
|
+
|
|
189
|
+
// The P sub filter spectra are pairwisely multiplied with the input spectra
|
|
190
|
+
// in the FDL. The results are accumulated in the frequency-domain.
|
|
191
|
+
memset(
|
|
192
|
+
_preMultiplied.data(),
|
|
193
|
+
0,
|
|
194
|
+
_preMultiplied.size() * sizeof(std::complex<float>));
|
|
195
|
+
// this is a bottleneck of the algorithm
|
|
196
|
+
for (int i = 0; i < _segCount; ++i) {
|
|
197
|
+
const int indexAudio = (_current + i) % _segCount;
|
|
198
|
+
const auto &impulseResponseSegment = _segmentsIR[i];
|
|
199
|
+
const auto &audioSegment = _segments[indexAudio];
|
|
200
|
+
pairwise_complex_multiply_fast(
|
|
201
|
+
impulseResponseSegment, audioSegment, _preMultiplied);
|
|
202
|
+
}
|
|
203
|
+
// Of the accumulated spectral convolutions, an 2B-point complex-to-real
|
|
204
|
+
// IFFT is computed. From the resulting 2B samples, the left half is
|
|
205
|
+
// discarded and the right half is returned as the next output block.
|
|
206
|
+
_fft->doInverseFFT(_preMultiplied, _fftBuffer.getData());
|
|
207
|
+
|
|
208
|
+
memcpy(
|
|
209
|
+
outputData,
|
|
210
|
+
_fftBuffer.getData() + _blockSize,
|
|
211
|
+
_blockSize * sizeof(float));
|
|
212
|
+
}
|
|
213
|
+
} // namespace audioapi
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <audioapi/utils/AudioArray.h>
|
|
4
|
+
#include <audioapi/dsp/FFT.h>
|
|
5
|
+
#include <vector>
|
|
6
|
+
#include <cstring>
|
|
7
|
+
#include <complex>
|
|
8
|
+
#include <memory>
|
|
9
|
+
#include <audioapi/utils/AlignedAllocator.hpp>
|
|
10
|
+
|
|
11
|
+
namespace audioapi {
|
|
12
|
+
|
|
13
|
+
class AudioBuffer;
|
|
14
|
+
|
|
15
|
+
class Convolver {
|
|
16
|
+
using aligned_vec_complex =
|
|
17
|
+
std::vector<std::complex<float>, AlignedAllocator<std::complex<float>, 16>>;
|
|
18
|
+
|
|
19
|
+
public:
|
|
20
|
+
Convolver();
|
|
21
|
+
bool init(size_t blockSize, const AudioArray &ir, size_t irLen);
|
|
22
|
+
void process(float* inputData, float* outputData);
|
|
23
|
+
void reset();
|
|
24
|
+
inline size_t getSegCount() const { return _trueSegmentCount; }
|
|
25
|
+
|
|
26
|
+
private:
|
|
27
|
+
size_t _trueSegmentCount;
|
|
28
|
+
size_t _blockSize;
|
|
29
|
+
size_t _segSize;
|
|
30
|
+
size_t _segCount;
|
|
31
|
+
size_t _fftComplexSize;
|
|
32
|
+
std::vector<aligned_vec_complex> _segments;
|
|
33
|
+
std::vector<aligned_vec_complex> _segmentsIR;
|
|
34
|
+
AudioArray _fftBuffer;
|
|
35
|
+
std::shared_ptr<dsp::FFT> _fft;
|
|
36
|
+
aligned_vec_complex _preMultiplied;
|
|
37
|
+
size_t _current;
|
|
38
|
+
AudioArray _inputBuffer;
|
|
39
|
+
|
|
40
|
+
friend void pairwise_complex_multiply_fast(
|
|
41
|
+
const aligned_vec_complex& ir,
|
|
42
|
+
const aligned_vec_complex& audio,
|
|
43
|
+
aligned_vec_complex& pre);
|
|
44
|
+
};
|
|
45
|
+
} // namespace audioapi
|
|
@@ -12,30 +12,4 @@ FFT::~FFT() {
|
|
|
12
12
|
pffft_aligned_free(work_);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
void FFT::doFFT(float *in, std::vector<std::complex<float>> &out) {
|
|
16
|
-
pffft_transform_ordered(
|
|
17
|
-
pffftSetup_,
|
|
18
|
-
in,
|
|
19
|
-
reinterpret_cast<float *>(&out[0]),
|
|
20
|
-
work_,
|
|
21
|
-
PFFFT_FORWARD);
|
|
22
|
-
|
|
23
|
-
dsp::multiplyByScalar(
|
|
24
|
-
reinterpret_cast<float *>(&out[0]),
|
|
25
|
-
0.5f,
|
|
26
|
-
reinterpret_cast<float *>(&out[0]),
|
|
27
|
-
size_ * 2);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
void FFT::doInverseFFT(std::vector<std::complex<float>> &in, float *out) {
|
|
31
|
-
pffft_transform_ordered(
|
|
32
|
-
pffftSetup_,
|
|
33
|
-
reinterpret_cast<float *>(&in[0]),
|
|
34
|
-
out,
|
|
35
|
-
work_,
|
|
36
|
-
PFFFT_BACKWARD);
|
|
37
|
-
|
|
38
|
-
dsp::multiplyByScalar(out, 1.0f / static_cast<float>(size_), out, size_);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
15
|
} // namespace audioapi::dsp
|
|
@@ -16,8 +16,32 @@ class FFT {
|
|
|
16
16
|
explicit FFT(int size);
|
|
17
17
|
~FFT();
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
void
|
|
19
|
+
template<typename Allocator>
|
|
20
|
+
void doFFT(float *in, std::vector<std::complex<float>, Allocator> &out) {
|
|
21
|
+
pffft_transform_ordered(
|
|
22
|
+
pffftSetup_,
|
|
23
|
+
in,
|
|
24
|
+
reinterpret_cast<float *>(&out[0]),
|
|
25
|
+
work_,
|
|
26
|
+
PFFFT_FORWARD);
|
|
27
|
+
// this is a possible place for bugs and mistakes
|
|
28
|
+
// due to pffft implementation and how it stores results
|
|
29
|
+
// keep this information in mind
|
|
30
|
+
// out[0].real = DC component - should be pure real
|
|
31
|
+
// out[0].imag = Nyquist component - should be pure real
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
template<typename Allocator>
|
|
35
|
+
void doInverseFFT(std::vector<std::complex<float>, Allocator> &in, float *out) {
|
|
36
|
+
pffft_transform_ordered(
|
|
37
|
+
pffftSetup_,
|
|
38
|
+
reinterpret_cast<float *>(&in[0]),
|
|
39
|
+
out,
|
|
40
|
+
work_,
|
|
41
|
+
PFFFT_BACKWARD);
|
|
42
|
+
|
|
43
|
+
dsp::multiplyByScalar(out, 1.0f / static_cast<float>(size_), out, size_);
|
|
44
|
+
}
|
|
21
45
|
|
|
22
46
|
private:
|
|
23
47
|
int size_;
|
|
@@ -20,7 +20,7 @@ class AudioEventHandlerRegistry : public IAudioEventHandlerRegistry {
|
|
|
20
20
|
explicit AudioEventHandlerRegistry(
|
|
21
21
|
jsi::Runtime *runtime,
|
|
22
22
|
const std::shared_ptr<react::CallInvoker> &callInvoker);
|
|
23
|
-
~AudioEventHandlerRegistry();
|
|
23
|
+
~AudioEventHandlerRegistry() override;
|
|
24
24
|
|
|
25
25
|
uint64_t registerHandler(const std::string &eventName, const std::shared_ptr<jsi::Function> &handler) override;
|
|
26
26
|
void unregisterHandler(const std::string &eventName, uint64_t listenerId) override;
|
|
@@ -225,7 +225,7 @@ typedef struct RcOverride{
|
|
|
225
225
|
#define AV_CODEC_FLAG_QPEL (1 << 4)
|
|
226
226
|
/**
|
|
227
227
|
* Request the encoder to output reconstructed frames, i.e.\ frames that would
|
|
228
|
-
* be produced by decoding the encoded
|
|
228
|
+
* be produced by decoding the encoded bitstream. These frames may be retrieved
|
|
229
229
|
* by calling avcodec_receive_frame() immediately after a successful call to
|
|
230
230
|
* avcodec_receive_packet().
|
|
231
231
|
*
|
|
@@ -436,7 +436,7 @@ typedef struct AVCodecContext {
|
|
|
436
436
|
const AVClass *av_class;
|
|
437
437
|
int log_level_offset;
|
|
438
438
|
|
|
439
|
-
enum
|
|
439
|
+
enum AVMediaTypeFFmpeg codec_type; /* see AVMEDIA_TYPE_xxx */
|
|
440
440
|
const struct AVCodec *codec;
|
|
441
441
|
enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
|
|
442
442
|
|
|
@@ -1946,7 +1946,7 @@ typedef struct AVHWAccel {
|
|
|
1946
1946
|
*
|
|
1947
1947
|
* See AVMEDIA_TYPE_xxx
|
|
1948
1948
|
*/
|
|
1949
|
-
enum
|
|
1949
|
+
enum AVMediaTypeFFmpeg type;
|
|
1950
1950
|
|
|
1951
1951
|
/**
|
|
1952
1952
|
* Codec implemented by the hardware accelerator.
|
|
@@ -2900,7 +2900,7 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
|
|
|
2900
2900
|
*
|
|
2901
2901
|
* @note for encoders, this function will only do something if the encoder
|
|
2902
2902
|
* declares support for AV_CODEC_CAP_ENCODER_FLUSH. When called, the encoder
|
|
2903
|
-
* will drain any remaining packets, and can then be
|
|
2903
|
+
* will drain any remaining packets, and can then be reused for a different
|
|
2904
2904
|
* stream (as opposed to sending a null frame which will leave the encoder
|
|
2905
2905
|
* in a permanent EOF state after draining). This can be desirable if the
|
|
2906
2906
|
* cost of tearing down and replacing the encoder instance is high.
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
*/
|
|
38
38
|
typedef struct AVCodecDescriptor {
|
|
39
39
|
enum AVCodecID id;
|
|
40
|
-
enum
|
|
40
|
+
enum AVMediaTypeFFmpeg type;
|
|
41
41
|
/**
|
|
42
42
|
* Name of the codec described by this descriptor. It is non-empty and
|
|
43
43
|
* unique for each codec descriptor. It should contain alphanumeric
|
|
@@ -330,6 +330,7 @@ enum AVCodecID {
|
|
|
330
330
|
AV_CODEC_ID_RV60,
|
|
331
331
|
AV_CODEC_ID_JPEGXL_ANIM,
|
|
332
332
|
AV_CODEC_ID_APV,
|
|
333
|
+
AV_CODEC_ID_PRORES_RAW,
|
|
333
334
|
|
|
334
335
|
/* various PCM "codecs" */
|
|
335
336
|
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
|
|
@@ -602,6 +603,7 @@ enum AVCodecID {
|
|
|
602
603
|
AV_CODEC_ID_BIN_DATA,
|
|
603
604
|
AV_CODEC_ID_SMPTE_2038,
|
|
604
605
|
AV_CODEC_ID_LCEVC,
|
|
606
|
+
AV_CODEC_ID_SMPTE_436M_ANC,
|
|
605
607
|
|
|
606
608
|
|
|
607
609
|
AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
|
|
@@ -627,7 +629,7 @@ enum AVCodecID {
|
|
|
627
629
|
/**
|
|
628
630
|
* Get the type of the given codec.
|
|
629
631
|
*/
|
|
630
|
-
enum
|
|
632
|
+
enum AVMediaTypeFFmpeg avcodec_get_type(enum AVCodecID codec_id);
|
|
631
633
|
|
|
632
634
|
/**
|
|
633
635
|
* Get the name of a codec.
|
|
@@ -48,7 +48,7 @@ typedef struct AVCodecParameters {
|
|
|
48
48
|
/**
|
|
49
49
|
* General type of the encoded data.
|
|
50
50
|
*/
|
|
51
|
-
enum
|
|
51
|
+
enum AVMediaTypeFFmpeg codec_type;
|
|
52
52
|
/**
|
|
53
53
|
* Specific type of the encoded data (the codec used).
|
|
54
54
|
*/
|
|
@@ -148,7 +148,7 @@ typedef struct AVCodecParameters {
|
|
|
148
148
|
* durations. Should be set to { 0, 1 } when some frames have differing
|
|
149
149
|
* durations or if the value is not known.
|
|
150
150
|
*
|
|
151
|
-
* @note This field
|
|
151
|
+
* @note This field corresponds to values that are stored in codec-level
|
|
152
152
|
* headers and is typically overridden by container/transport-layer
|
|
153
153
|
* timestamps, when available. It should thus be used only as a last resort,
|
|
154
154
|
* when no higher-level timing information is available.
|
|
@@ -142,7 +142,7 @@ enum AVPacketSideDataType {
|
|
|
142
142
|
AV_PKT_DATA_CPB_PROPERTIES,
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
|
-
*
|
|
145
|
+
* Recommends skipping the specified number of samples
|
|
146
146
|
* @code
|
|
147
147
|
* u32le number of samples to skip from start of this packet
|
|
148
148
|
* u32le number of samples to skip from end of this packet
|