react-native-audio-api 0.11.0-nightly-141c86f-20251118 → 0.11.0-nightly-4e6f25c-20251119
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/android/src/main/cpp/audioapi/android/AudioAPIModule.cpp +10 -16
- package/android/src/main/cpp/audioapi/android/OnLoad.cpp +1 -2
- package/android/src/main/cpp/audioapi/android/core/AndroidAudioRecorder.cpp +4 -4
- package/android/src/main/cpp/audioapi/android/core/AudioPlayer.cpp +11 -20
- package/android/src/main/cpp/audioapi/android/core/utils/AudioDecoder.cpp +24 -46
- package/common/cpp/audioapi/AudioAPIModuleInstaller.h +48 -78
- package/common/cpp/audioapi/HostObjects/AudioContextHostObject.cpp +20 -21
- package/common/cpp/audioapi/HostObjects/AudioNodeHostObject.cpp +3 -4
- package/common/cpp/audioapi/HostObjects/AudioParamHostObject.cpp +6 -8
- package/common/cpp/audioapi/HostObjects/AudioParamHostObject.h +2 -2
- package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.cpp +42 -78
- package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.h +1 -1
- package/common/cpp/audioapi/HostObjects/OfflineAudioContextHostObject.cpp +14 -18
- package/common/cpp/audioapi/HostObjects/OfflineAudioContextHostObject.h +3 -3
- package/common/cpp/audioapi/HostObjects/WorkletNodeHostObject.h +1 -2
- package/common/cpp/audioapi/HostObjects/WorkletProcessingNodeHostObject.h +1 -2
- package/common/cpp/audioapi/HostObjects/analysis/AnalyserNodeHostObject.cpp +10 -18
- package/common/cpp/audioapi/HostObjects/destinations/AudioDestinationNodeHostObject.h +2 -3
- package/common/cpp/audioapi/HostObjects/effects/BiquadFilterNodeHostObject.cpp +16 -28
- package/common/cpp/audioapi/HostObjects/effects/BiquadFilterNodeHostObject.h +1 -2
- package/common/cpp/audioapi/HostObjects/effects/ConvolverNodeHostObject.cpp +4 -6
- package/common/cpp/audioapi/HostObjects/effects/GainNodeHostObject.cpp +2 -2
- package/common/cpp/audioapi/HostObjects/effects/PeriodicWaveHostObject.h +1 -2
- package/common/cpp/audioapi/HostObjects/effects/StereoPannerNodeHostObject.cpp +2 -2
- package/common/cpp/audioapi/HostObjects/effects/StereoPannerNodeHostObject.h +1 -2
- package/common/cpp/audioapi/HostObjects/events/AudioEventHandlerRegistryHostObject.cpp +6 -12
- package/common/cpp/audioapi/HostObjects/events/AudioEventHandlerRegistryHostObject.h +7 -7
- package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.cpp +8 -10
- package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.h +1 -1
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferBaseSourceNodeHostObject.cpp +13 -27
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferBaseSourceNodeHostObject.h +11 -12
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferHostObject.cpp +15 -22
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferHostObject.h +5 -7
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferQueueSourceNodeHostObject.cpp +7 -12
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferQueueSourceNodeHostObject.h +8 -9
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferSourceNodeHostObject.cpp +16 -30
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferSourceNodeHostObject.h +2 -4
- package/common/cpp/audioapi/HostObjects/sources/AudioScheduledSourceNodeHostObject.cpp +6 -10
- package/common/cpp/audioapi/HostObjects/sources/ConstantSourceNodeHostObject.cpp +2 -2
- package/common/cpp/audioapi/HostObjects/sources/ConstantSourceNodeHostObject.h +1 -2
- package/common/cpp/audioapi/HostObjects/sources/OscillatorNodeHostObject.cpp +6 -8
- package/common/cpp/audioapi/HostObjects/sources/OscillatorNodeHostObject.h +1 -2
- package/common/cpp/audioapi/HostObjects/sources/RecorderAdapterNodeHostObject.h +4 -5
- package/common/cpp/audioapi/HostObjects/sources/StreamerNodeHostObject.cpp +2 -2
- package/common/cpp/audioapi/HostObjects/sources/StreamerNodeHostObject.h +5 -6
- package/common/cpp/audioapi/HostObjects/sources/WorkletSourceNodeHostObject.h +1 -2
- package/common/cpp/audioapi/HostObjects/utils/AudioDecoderHostObject.cpp +39 -60
- package/common/cpp/audioapi/HostObjects/utils/AudioStretcherHostObject.cpp +4 -8
- package/common/cpp/audioapi/core/AudioContext.cpp +4 -4
- package/common/cpp/audioapi/core/AudioContext.h +5 -2
- package/common/cpp/audioapi/core/AudioNode.cpp +13 -19
- package/common/cpp/audioapi/core/AudioNode.h +14 -7
- package/common/cpp/audioapi/core/AudioParam.cpp +66 -98
- package/common/cpp/audioapi/core/AudioParam.h +20 -12
- package/common/cpp/audioapi/core/BaseAudioContext.cpp +22 -34
- package/common/cpp/audioapi/core/BaseAudioContext.h +19 -15
- package/common/cpp/audioapi/core/OfflineAudioContext.cpp +12 -17
- package/common/cpp/audioapi/core/OfflineAudioContext.h +10 -5
- package/common/cpp/audioapi/core/analysis/AnalyserNode.cpp +13 -21
- package/common/cpp/audioapi/core/analysis/AnalyserNode.h +8 -6
- package/common/cpp/audioapi/core/destinations/AudioDestinationNode.cpp +1 -0
- package/common/cpp/audioapi/core/destinations/AudioDestinationNode.h +5 -3
- package/common/cpp/audioapi/core/effects/BiquadFilterNode.cpp +17 -36
- package/common/cpp/audioapi/core/effects/BiquadFilterNode.h +2 -9
- package/common/cpp/audioapi/core/effects/ConvolverNode.cpp +18 -28
- package/common/cpp/audioapi/core/effects/ConvolverNode.h +19 -10
- package/common/cpp/audioapi/core/effects/GainNode.cpp +1 -0
- package/common/cpp/audioapi/core/effects/GainNode.h +3 -1
- package/common/cpp/audioapi/core/effects/PeriodicWave.cpp +22 -35
- package/common/cpp/audioapi/core/effects/PeriodicWave.h +4 -9
- package/common/cpp/audioapi/core/effects/StereoPannerNode.cpp +4 -5
- package/common/cpp/audioapi/core/effects/StereoPannerNode.h +4 -2
- package/common/cpp/audioapi/core/effects/WorkletNode.cpp +11 -13
- package/common/cpp/audioapi/core/effects/WorkletNode.h +15 -12
- package/common/cpp/audioapi/core/effects/WorkletProcessingNode.cpp +4 -4
- package/common/cpp/audioapi/core/effects/WorkletProcessingNode.h +15 -14
- package/common/cpp/audioapi/core/inputs/AudioRecorder.cpp +9 -8
- package/common/cpp/audioapi/core/inputs/AudioRecorder.h +4 -5
- package/common/cpp/audioapi/core/sources/AudioBuffer.cpp +4 -6
- package/common/cpp/audioapi/core/sources/AudioBuffer.h +4 -7
- package/common/cpp/audioapi/core/sources/AudioBufferBaseSourceNode.cpp +31 -53
- package/common/cpp/audioapi/core/sources/AudioBufferBaseSourceNode.h +35 -33
- package/common/cpp/audioapi/core/sources/AudioBufferQueueSourceNode.cpp +19 -20
- package/common/cpp/audioapi/core/sources/AudioBufferQueueSourceNode.h +38 -36
- package/common/cpp/audioapi/core/sources/AudioBufferSourceNode.cpp +25 -40
- package/common/cpp/audioapi/core/sources/AudioBufferSourceNode.h +3 -1
- package/common/cpp/audioapi/core/sources/AudioScheduledSourceNode.cpp +9 -9
- package/common/cpp/audioapi/core/sources/AudioScheduledSourceNode.h +3 -3
- package/common/cpp/audioapi/core/sources/ConstantSourceNode.cpp +3 -4
- package/common/cpp/audioapi/core/sources/ConstantSourceNode.h +3 -1
- package/common/cpp/audioapi/core/sources/OscillatorNode.cpp +12 -23
- package/common/cpp/audioapi/core/sources/OscillatorNode.h +6 -4
- package/common/cpp/audioapi/core/sources/RecorderAdapterNode.cpp +3 -4
- package/common/cpp/audioapi/core/sources/RecorderAdapterNode.h +18 -16
- package/common/cpp/audioapi/core/sources/StreamerNode.cpp +7 -4
- package/common/cpp/audioapi/core/sources/StreamerNode.h +38 -30
- package/common/cpp/audioapi/core/sources/WorkletSourceNode.cpp +5 -7
- package/common/cpp/audioapi/core/sources/WorkletSourceNode.h +15 -13
- package/common/cpp/audioapi/core/types/AudioFormat.h +1 -11
- package/common/cpp/audioapi/core/utils/AudioDecoder.h +15 -6
- package/common/cpp/audioapi/core/utils/AudioNodeDestructor.cpp +5 -6
- package/common/cpp/audioapi/core/utils/AudioNodeDestructor.h +7 -10
- package/common/cpp/audioapi/core/utils/AudioNodeManager.cpp +13 -22
- package/common/cpp/audioapi/core/utils/AudioNodeManager.h +8 -11
- package/common/cpp/audioapi/core/utils/AudioParamEventQueue.cpp +3 -3
- package/common/cpp/audioapi/core/utils/AudioParamEventQueue.h +5 -5
- package/common/cpp/audioapi/core/utils/AudioStretcher.cpp +6 -6
- package/common/cpp/audioapi/core/utils/Constants.h +5 -3
- package/common/cpp/audioapi/core/utils/ParamChangeEvent.cpp +1 -0
- package/common/cpp/audioapi/core/utils/ParamChangeEvent.h +9 -9
- package/common/cpp/audioapi/core/utils/worklets/SafeIncludes.h +29 -34
- package/common/cpp/audioapi/core/utils/worklets/WorkletsRunner.cpp +14 -16
- package/common/cpp/audioapi/core/utils/worklets/WorkletsRunner.h +23 -19
- package/common/cpp/audioapi/dsp/AudioUtils.cpp +3 -9
- package/common/cpp/audioapi/dsp/AudioUtils.h +1 -1
- package/common/cpp/audioapi/dsp/Convolver.cpp +13 -25
- package/common/cpp/audioapi/dsp/Convolver.h +26 -24
- package/common/cpp/audioapi/dsp/FFT.cpp +1 -1
- package/common/cpp/audioapi/dsp/FFT.h +5 -13
- package/common/cpp/audioapi/dsp/VectorMath.cpp +9 -43
- package/common/cpp/audioapi/dsp/VectorMath.h +35 -8
- package/common/cpp/audioapi/dsp/Windows.cpp +4 -9
- package/common/cpp/audioapi/dsp/Windows.h +24 -23
- package/common/cpp/audioapi/events/AudioEventHandlerRegistry.cpp +12 -17
- package/common/cpp/audioapi/events/AudioEventHandlerRegistry.h +44 -39
- package/common/cpp/audioapi/events/IAudioEventHandlerRegistry.h +15 -7
- package/common/cpp/audioapi/jsi/AudioArrayBuffer.h +4 -5
- package/common/cpp/audioapi/jsi/JsiHostObject.cpp +11 -13
- package/common/cpp/audioapi/jsi/JsiHostObject.h +26 -33
- package/common/cpp/audioapi/jsi/JsiPromise.cpp +11 -21
- package/common/cpp/audioapi/jsi/JsiPromise.h +55 -46
- package/common/cpp/audioapi/jsi/RuntimeLifecycleMonitor.cpp +7 -10
- package/common/cpp/audioapi/jsi/RuntimeLifecycleMonitor.h +1 -3
- package/common/cpp/audioapi/utils/AudioArray.cpp +3 -8
- package/common/cpp/audioapi/utils/AudioArray.h +3 -11
- package/common/cpp/audioapi/utils/AudioBus.cpp +51 -149
- package/common/cpp/audioapi/utils/AudioBus.h +15 -15
- package/common/cpp/audioapi/utils/CircularAudioArray.cpp +6 -18
- package/common/cpp/audioapi/utils/CircularOverflowableAudioArray.cpp +6 -10
- package/common/cpp/audioapi/utils/CircularOverflowableAudioArray.h +2 -2
- package/common/cpp/test/src/AudioParamTest.cpp +3 -2
- package/common/cpp/test/src/AudioScheduledSourceTest.cpp +14 -35
- package/common/cpp/test/src/ConstantSourceTest.cpp +4 -6
- package/common/cpp/test/src/GainTest.cpp +3 -4
- package/common/cpp/test/src/MockAudioEventHandlerRegistry.h +19 -11
- package/common/cpp/test/src/OscillatorTest.cpp +1 -0
- package/common/cpp/test/src/StereoPannerTest.cpp +5 -8
- package/common/cpp/test/src/biquad/BiquadFilterChromium.cpp +10 -27
- package/common/cpp/test/src/biquad/BiquadFilterChromium.h +7 -6
- package/common/cpp/test/src/biquad/BiquadFilterTest.cpp +16 -28
- package/common/cpp/test/src/biquad/BiquadFilterTest.h +13 -6
- package/ios/audioapi/ios/AudioAPIModule.h +4 -6
- package/ios/audioapi/ios/AudioAPIModule.mm +31 -46
- package/ios/audioapi/ios/core/IOSAudioPlayer.mm +24 -33
- package/ios/audioapi/ios/core/IOSAudioRecorder.h +1 -2
- package/ios/audioapi/ios/core/IOSAudioRecorder.mm +4 -6
- package/ios/audioapi/ios/core/NativeAudioPlayer.m +3 -5
- package/ios/audioapi/ios/core/NativeAudioRecorder.h +1 -2
- package/ios/audioapi/ios/core/NativeAudioRecorder.m +21 -33
- package/ios/audioapi/ios/core/utils/AudioDecoder.mm +17 -37
- package/ios/audioapi/ios/system/AudioEngine.h +2 -4
- package/ios/audioapi/ios/system/AudioEngine.mm +7 -19
- package/ios/audioapi/ios/system/AudioSessionManager.h +2 -4
- package/ios/audioapi/ios/system/AudioSessionManager.mm +17 -32
- package/ios/audioapi/ios/system/LockScreenManager.mm +73 -105
- package/ios/audioapi/ios/system/NotificationManager.mm +43 -68
- package/package.json +2 -2
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
#include <audioapi/dsp/AudioUtils.h>
|
|
27
27
|
#include <audioapi/dsp/VectorMath.h>
|
|
28
|
+
#include <algorithm>
|
|
28
29
|
|
|
29
30
|
#if defined(HAVE_ACCELERATE)
|
|
30
31
|
#include <Accelerate/Accelerate.h>
|
|
@@ -47,8 +48,7 @@ void multiplyByScalar(
|
|
|
47
48
|
float scalar,
|
|
48
49
|
float *outputVector,
|
|
49
50
|
size_t numberOfElementsToProcess) {
|
|
50
|
-
vDSP_vsmul(
|
|
51
|
-
inputVector, 1, &scalar, outputVector, 1, numberOfElementsToProcess);
|
|
51
|
+
vDSP_vsmul(inputVector, 1, &scalar, outputVector, 1, numberOfElementsToProcess);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
void addScalar(
|
|
@@ -56,8 +56,7 @@ void addScalar(
|
|
|
56
56
|
float scalar,
|
|
57
57
|
float *outputVector,
|
|
58
58
|
size_t numberOfElementsToProcess) {
|
|
59
|
-
vDSP_vsadd(
|
|
60
|
-
inputVector, 1, &scalar, outputVector, 1, numberOfElementsToProcess);
|
|
59
|
+
vDSP_vsadd(inputVector, 1, &scalar, outputVector, 1, numberOfElementsToProcess);
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
void add(
|
|
@@ -65,14 +64,7 @@ void add(
|
|
|
65
64
|
const float *inputVector2,
|
|
66
65
|
float *outputVector,
|
|
67
66
|
size_t numberOfElementsToProcess) {
|
|
68
|
-
vDSP_vadd(
|
|
69
|
-
inputVector1,
|
|
70
|
-
1,
|
|
71
|
-
inputVector2,
|
|
72
|
-
1,
|
|
73
|
-
outputVector,
|
|
74
|
-
1,
|
|
75
|
-
numberOfElementsToProcess);
|
|
67
|
+
vDSP_vadd(inputVector1, 1, inputVector2, 1, outputVector, 1, numberOfElementsToProcess);
|
|
76
68
|
}
|
|
77
69
|
|
|
78
70
|
void subtract(
|
|
@@ -80,14 +72,7 @@ void subtract(
|
|
|
80
72
|
const float *inputVector2,
|
|
81
73
|
float *outputVector,
|
|
82
74
|
size_t numberOfElementsToProcess) {
|
|
83
|
-
vDSP_vsub(
|
|
84
|
-
inputVector1,
|
|
85
|
-
1,
|
|
86
|
-
inputVector2,
|
|
87
|
-
1,
|
|
88
|
-
outputVector,
|
|
89
|
-
1,
|
|
90
|
-
numberOfElementsToProcess);
|
|
75
|
+
vDSP_vsub(inputVector1, 1, inputVector2, 1, outputVector, 1, numberOfElementsToProcess);
|
|
91
76
|
}
|
|
92
77
|
|
|
93
78
|
void multiply(
|
|
@@ -95,19 +80,10 @@ void multiply(
|
|
|
95
80
|
const float *inputVector2,
|
|
96
81
|
float *outputVector,
|
|
97
82
|
size_t numberOfElementsToProcess) {
|
|
98
|
-
vDSP_vmul(
|
|
99
|
-
inputVector1,
|
|
100
|
-
1,
|
|
101
|
-
inputVector2,
|
|
102
|
-
1,
|
|
103
|
-
outputVector,
|
|
104
|
-
1,
|
|
105
|
-
numberOfElementsToProcess);
|
|
83
|
+
vDSP_vmul(inputVector1, 1, inputVector2, 1, outputVector, 1, numberOfElementsToProcess);
|
|
106
84
|
}
|
|
107
85
|
|
|
108
|
-
float maximumMagnitude(
|
|
109
|
-
const float *inputVector,
|
|
110
|
-
size_t numberOfElementsToProcess) {
|
|
86
|
+
float maximumMagnitude(const float *inputVector, size_t numberOfElementsToProcess) {
|
|
111
87
|
float maximumValue = 0;
|
|
112
88
|
vDSP_maxmgv(inputVector, 1, &maximumValue, numberOfElementsToProcess);
|
|
113
89
|
return maximumValue;
|
|
@@ -118,15 +94,7 @@ void multiplyByScalarThenAddToOutput(
|
|
|
118
94
|
float scalar,
|
|
119
95
|
float *outputVector,
|
|
120
96
|
size_t numberOfElementsToProcess) {
|
|
121
|
-
vDSP_vsma(
|
|
122
|
-
inputVector,
|
|
123
|
-
1,
|
|
124
|
-
&scalar,
|
|
125
|
-
outputVector,
|
|
126
|
-
1,
|
|
127
|
-
outputVector,
|
|
128
|
-
1,
|
|
129
|
-
numberOfElementsToProcess);
|
|
97
|
+
vDSP_vsma(inputVector, 1, &scalar, outputVector, 1, outputVector, 1, numberOfElementsToProcess);
|
|
130
98
|
}
|
|
131
99
|
|
|
132
100
|
#else
|
|
@@ -552,9 +520,7 @@ void multiply(
|
|
|
552
520
|
}
|
|
553
521
|
}
|
|
554
522
|
|
|
555
|
-
float maximumMagnitude(
|
|
556
|
-
const float *inputVector,
|
|
557
|
-
size_t numberOfElementsToProcess) {
|
|
523
|
+
float maximumMagnitude(const float *inputVector, size_t numberOfElementsToProcess) {
|
|
558
524
|
size_t n = numberOfElementsToProcess;
|
|
559
525
|
float max = 0;
|
|
560
526
|
|
|
@@ -28,23 +28,50 @@
|
|
|
28
28
|
// Defines the interface for several vector math functions whose implementation
|
|
29
29
|
// will ideally be optimized.
|
|
30
30
|
|
|
31
|
-
#include <cstddef>
|
|
32
31
|
#include <algorithm>
|
|
33
32
|
#include <cmath>
|
|
33
|
+
#include <cstddef>
|
|
34
34
|
|
|
35
35
|
namespace audioapi::dsp {
|
|
36
36
|
|
|
37
|
-
void multiplyByScalarThenAddToOutput(
|
|
37
|
+
void multiplyByScalarThenAddToOutput(
|
|
38
|
+
const float *inputVector,
|
|
39
|
+
float scalar,
|
|
40
|
+
float *outputVector,
|
|
41
|
+
size_t numberOfElementsToProcess);
|
|
38
42
|
|
|
39
|
-
void multiplyByScalar(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
void multiplyByScalar(
|
|
44
|
+
const float *inputVector,
|
|
45
|
+
float scalar,
|
|
46
|
+
float *outputVector,
|
|
47
|
+
size_t numberOfElementsToProcess);
|
|
48
|
+
void addScalar(
|
|
49
|
+
const float *inputVector,
|
|
50
|
+
float scalar,
|
|
51
|
+
float *outputVector,
|
|
52
|
+
size_t numberOfElementsToProcess);
|
|
53
|
+
void add(
|
|
54
|
+
const float *inputVector1,
|
|
55
|
+
const float *inputVector2,
|
|
56
|
+
float *outputVector,
|
|
57
|
+
size_t numberOfElementsToProcess);
|
|
58
|
+
void subtract(
|
|
59
|
+
const float *inputVector1,
|
|
60
|
+
const float *inputVector2,
|
|
61
|
+
float *outputVector,
|
|
62
|
+
size_t numberOfElementsToProcess);
|
|
63
|
+
void multiply(
|
|
64
|
+
const float *inputVector1,
|
|
65
|
+
const float *inputVector2,
|
|
66
|
+
float *outputVector,
|
|
67
|
+
size_t numberOfElementsToProcess);
|
|
44
68
|
|
|
45
69
|
// Finds the maximum magnitude of a float vector.
|
|
46
70
|
float maximumMagnitude(const float *inputVector, size_t numberOfElementsToProcess);
|
|
47
71
|
|
|
48
|
-
void linearToDecibels(
|
|
72
|
+
void linearToDecibels(
|
|
73
|
+
const float *inputVector,
|
|
74
|
+
float *outputVector,
|
|
75
|
+
size_t numberOfElementsToProcess);
|
|
49
76
|
|
|
50
77
|
} // namespace audioapi::dsp
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
#include <audioapi/core/utils/Constants.h>
|
|
2
2
|
#include <audioapi/dsp/Windows.h>
|
|
3
|
+
#include <algorithm>
|
|
3
4
|
|
|
4
5
|
namespace audioapi::dsp {
|
|
5
6
|
|
|
6
|
-
void WindowFunction::forcePerfectReconstruction(
|
|
7
|
-
float *data,
|
|
8
|
-
int windowLength,
|
|
9
|
-
int interval) {
|
|
7
|
+
void WindowFunction::forcePerfectReconstruction(float *data, int windowLength, int interval) {
|
|
10
8
|
for (int i = 0; i < interval; ++i) {
|
|
11
9
|
float sum2 = 0;
|
|
12
10
|
|
|
@@ -58,14 +56,11 @@ float Kaiser::bandwidthToBeta(float bandwidth, bool heuristicOptimal) {
|
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
void ApproximateConfinedGaussian::apply(float *data, int size) const {
|
|
61
|
-
auto offsetScale =
|
|
62
|
-
getGaussian(1.0f) / (getGaussian(3.0f) + getGaussian(-1.0f));
|
|
59
|
+
auto offsetScale = getGaussian(1.0f) / (getGaussian(3.0f) + getGaussian(-1.0f));
|
|
63
60
|
auto norm = 1 / (getGaussian(1.0f) - 2 * offsetScale * getGaussian(2.0f));
|
|
64
61
|
for (int i = 0; i < size; ++i) {
|
|
65
62
|
auto r = static_cast<float>(2 * i + 1) / static_cast<float>(size) - 1.0f;
|
|
66
|
-
data[i] = norm *
|
|
67
|
-
(getGaussian(r) -
|
|
68
|
-
offsetScale * (getGaussian(r - 2) + getGaussian(r + 2)));
|
|
63
|
+
data[i] = norm * (getGaussian(r) - offsetScale * (getGaussian(r - 2) + getGaussian(r + 2)));
|
|
69
64
|
}
|
|
70
65
|
}
|
|
71
66
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
3
|
#include <cmath>
|
|
4
|
-
#include <algorithm>
|
|
5
4
|
|
|
6
5
|
namespace audioapi::dsp {
|
|
7
6
|
|
|
@@ -9,7 +8,7 @@ namespace audioapi::dsp {
|
|
|
9
8
|
// https://personalpages.hs-kempten.de/~vollratj/InEl/pdf/Window%20function%20-%20Wikipedia.pdf
|
|
10
9
|
class WindowFunction {
|
|
11
10
|
public:
|
|
12
|
-
explicit WindowFunction(float amplitude = 1.0f): amplitude_(amplitude) {}
|
|
11
|
+
explicit WindowFunction(float amplitude = 1.0f) : amplitude_(amplitude) {}
|
|
13
12
|
|
|
14
13
|
virtual void apply(float *data, int size) const = 0;
|
|
15
14
|
// forces STFT perfect-reconstruction (WOLA) on an existing window, for a given STFT interval.
|
|
@@ -23,29 +22,30 @@ class WindowFunction {
|
|
|
23
22
|
//https://en.wikipedia.org/wiki/Hann_function
|
|
24
23
|
// https://www.sciencedirect.com/topics/engineering/hanning-window
|
|
25
24
|
// https://docs.scipy.org/doc//scipy-1.2.3/reference/generated/scipy.signal.windows.hann.html#scipy.signal.windows.hann
|
|
26
|
-
class Hann: public WindowFunction {
|
|
25
|
+
class Hann : public WindowFunction {
|
|
27
26
|
public:
|
|
28
|
-
explicit Hann(float amplitude = 1.0f): WindowFunction(amplitude) {}
|
|
27
|
+
explicit Hann(float amplitude = 1.0f) : WindowFunction(amplitude) {}
|
|
29
28
|
|
|
30
29
|
void apply(float *data, int size) const override;
|
|
31
30
|
};
|
|
32
31
|
|
|
33
32
|
// https://www.sciencedirect.com/topics/engineering/blackman-window
|
|
34
33
|
// https://docs.scipy.org/doc//scipy-1.2.3/reference/generated/scipy.signal.windows.blackman.html#scipy.signal.windows.blackman
|
|
35
|
-
class Blackman: public WindowFunction {
|
|
34
|
+
class Blackman : public WindowFunction {
|
|
36
35
|
public:
|
|
37
|
-
explicit Blackman(float amplitude = 1.0f): WindowFunction(amplitude) {}
|
|
36
|
+
explicit Blackman(float amplitude = 1.0f) : WindowFunction(amplitude) {}
|
|
38
37
|
|
|
39
38
|
void apply(float *data, int size) const override;
|
|
40
39
|
};
|
|
41
40
|
|
|
42
|
-
|
|
43
41
|
// https://en.wikipedia.org/wiki/Kaiser_window
|
|
44
|
-
class Kaiser: public WindowFunction {
|
|
42
|
+
class Kaiser : public WindowFunction {
|
|
45
43
|
public:
|
|
46
|
-
explicit Kaiser(float beta, float amplitude = 1.0f)
|
|
44
|
+
explicit Kaiser(float beta, float amplitude = 1.0f)
|
|
45
|
+
: WindowFunction(amplitude), beta_(beta), invB0_(1.0f / bessel0(beta)) {}
|
|
47
46
|
|
|
48
|
-
static Kaiser
|
|
47
|
+
static Kaiser
|
|
48
|
+
withBandwidth(float bandwidth, bool heuristicOptimal = false, float amplitude = 1.0f) {
|
|
49
49
|
return Kaiser(bandwidthToBeta(bandwidth, heuristicOptimal), amplitude);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -59,25 +59,26 @@ class Kaiser: public WindowFunction {
|
|
|
59
59
|
|
|
60
60
|
// https://en.wikipedia.org/wiki/Bessel_function#Modified_Bessel_functions:_I%CE%B1,_K%CE%B1
|
|
61
61
|
static inline float bessel0(float x) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
const double significanceLimit = 1e-4;
|
|
63
|
+
auto result = 0.0f;
|
|
64
|
+
auto term = 1.0f;
|
|
65
|
+
auto m = 1.0f;
|
|
66
|
+
while (term > significanceLimit) {
|
|
67
|
+
result += term;
|
|
68
|
+
++m;
|
|
69
|
+
term *= (x * x) / (4 * m * m);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return result;
|
|
73
73
|
}
|
|
74
74
|
static float bandwidthToBeta(float bandwidth, bool heuristicOptimal = false);
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
// https://www.recordingblogs.com/wiki/gaussian-window
|
|
78
|
-
class ApproximateConfinedGaussian: public WindowFunction {
|
|
78
|
+
class ApproximateConfinedGaussian : public WindowFunction {
|
|
79
79
|
public:
|
|
80
|
-
explicit ApproximateConfinedGaussian(float sigma, float amplitude = 1.0f)
|
|
80
|
+
explicit ApproximateConfinedGaussian(float sigma, float amplitude = 1.0f)
|
|
81
|
+
: WindowFunction(amplitude), gaussianFactor_(0.0625f / (sigma * sigma)) {}
|
|
81
82
|
|
|
82
83
|
static ApproximateConfinedGaussian withBandwidth(float bandwidth, float amplitude = 1.0f) {
|
|
83
84
|
return ApproximateConfinedGaussian(bandwidthToSigma(bandwidth), amplitude);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
#include <audioapi/HostObjects/sources/AudioBufferHostObject.h>
|
|
2
2
|
#include <audioapi/events/AudioEventHandlerRegistry.h>
|
|
3
|
+
#include <memory>
|
|
4
|
+
#include <string>
|
|
5
|
+
#include <unordered_map>
|
|
3
6
|
|
|
4
7
|
namespace audioapi {
|
|
5
8
|
|
|
@@ -100,12 +103,9 @@ void AudioEventHandlerRegistry::invokeHandlerWithEventBody(
|
|
|
100
103
|
if (eventName.compare("audioReady") == 0) {
|
|
101
104
|
auto bufferIt = body.find("buffer");
|
|
102
105
|
if (bufferIt != body.end()) {
|
|
103
|
-
auto bufferHostObject =
|
|
104
|
-
std::
|
|
105
|
-
|
|
106
|
-
bufferIt->second));
|
|
107
|
-
eventObject =
|
|
108
|
-
createEventObject(body, bufferHostObject->getSizeInBytes());
|
|
106
|
+
auto bufferHostObject = std::static_pointer_cast<AudioBufferHostObject>(
|
|
107
|
+
std::get<std::shared_ptr<jsi::HostObject>>(bufferIt->second));
|
|
108
|
+
eventObject = createEventObject(body, bufferHostObject->getSizeInBytes());
|
|
109
109
|
}
|
|
110
110
|
} else {
|
|
111
111
|
eventObject = createEventObject(body);
|
|
@@ -117,8 +117,7 @@ void AudioEventHandlerRegistry::invokeHandlerWithEventBody(
|
|
|
117
117
|
throw;
|
|
118
118
|
} catch (...) {
|
|
119
119
|
printf(
|
|
120
|
-
"Unknown exception occurred while invoking handler for event: %s\n",
|
|
121
|
-
eventName.c_str());
|
|
120
|
+
"Unknown exception occurred while invoking handler for event: %s\n", eventName.c_str());
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
});
|
|
@@ -168,11 +167,9 @@ void AudioEventHandlerRegistry::invokeHandlerWithEventBody(
|
|
|
168
167
|
if (eventName.compare("audioReady") == 0) {
|
|
169
168
|
auto bufferIt = body.find("buffer");
|
|
170
169
|
if (bufferIt != body.end()) {
|
|
171
|
-
auto bufferHostObject =
|
|
172
|
-
std::
|
|
173
|
-
|
|
174
|
-
eventObject =
|
|
175
|
-
createEventObject(body, bufferHostObject->getSizeInBytes());
|
|
170
|
+
auto bufferHostObject = std::static_pointer_cast<AudioBufferHostObject>(
|
|
171
|
+
std::get<std::shared_ptr<jsi::HostObject>>(bufferIt->second));
|
|
172
|
+
eventObject = createEventObject(body, bufferHostObject->getSizeInBytes());
|
|
176
173
|
}
|
|
177
174
|
} else {
|
|
178
175
|
eventObject = createEventObject(body);
|
|
@@ -184,8 +181,7 @@ void AudioEventHandlerRegistry::invokeHandlerWithEventBody(
|
|
|
184
181
|
throw;
|
|
185
182
|
} catch (...) {
|
|
186
183
|
printf(
|
|
187
|
-
"Unknown exception occurred while invoking handler for event: %s\n",
|
|
188
|
-
eventName.c_str());
|
|
184
|
+
"Unknown exception occurred while invoking handler for event: %s\n", eventName.c_str());
|
|
189
185
|
}
|
|
190
186
|
});
|
|
191
187
|
}
|
|
@@ -208,8 +204,7 @@ jsi::Object AudioEventHandlerRegistry::createEventObject(
|
|
|
208
204
|
eventObject.setProperty(*runtime_, name, std::get<bool>(value));
|
|
209
205
|
} else if (std::holds_alternative<std::string>(value)) {
|
|
210
206
|
eventObject.setProperty(*runtime_, name, std::get<std::string>(value));
|
|
211
|
-
} else if (std::holds_alternative<std::shared_ptr<jsi::HostObject>>(
|
|
212
|
-
value)) {
|
|
207
|
+
} else if (std::holds_alternative<std::shared_ptr<jsi::HostObject>>(value)) {
|
|
213
208
|
auto hostObject = jsi::Object::createFromHostObject(
|
|
214
209
|
*runtime_, std::get<std::shared_ptr<jsi::HostObject>>(value));
|
|
215
210
|
eventObject.setProperty(*runtime_, name, hostObject);
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
-
#include <jsi/jsi.h>
|
|
4
3
|
#include <ReactCommon/CallInvoker.h>
|
|
5
4
|
#include <audioapi/events/IAudioEventHandlerRegistry.h>
|
|
6
|
-
#include <
|
|
7
|
-
#include <unordered_map>
|
|
5
|
+
#include <jsi/jsi.h>
|
|
8
6
|
#include <array>
|
|
7
|
+
#include <atomic>
|
|
8
|
+
#include <memory>
|
|
9
9
|
#include <string>
|
|
10
|
+
#include <unordered_map>
|
|
10
11
|
#include <variant>
|
|
11
|
-
#include <atomic>
|
|
12
12
|
|
|
13
13
|
namespace audioapi {
|
|
14
14
|
using namespace facebook;
|
|
15
15
|
|
|
16
|
-
using EventValue =
|
|
16
|
+
using EventValue =
|
|
17
|
+
std::variant<int, float, double, std::string, bool, std::shared_ptr<jsi::HostObject>>;
|
|
17
18
|
|
|
18
19
|
class AudioEventHandlerRegistry : public IAudioEventHandlerRegistry {
|
|
19
20
|
public:
|
|
@@ -22,48 +23,52 @@ class AudioEventHandlerRegistry : public IAudioEventHandlerRegistry {
|
|
|
22
23
|
const std::shared_ptr<react::CallInvoker> &callInvoker);
|
|
23
24
|
~AudioEventHandlerRegistry() override;
|
|
24
25
|
|
|
25
|
-
uint64_t registerHandler(
|
|
26
|
+
uint64_t registerHandler(
|
|
27
|
+
const std::string &eventName,
|
|
28
|
+
const std::shared_ptr<jsi::Function> &handler) override;
|
|
26
29
|
void unregisterHandler(const std::string &eventName, uint64_t listenerId) override;
|
|
27
30
|
|
|
28
|
-
void invokeHandlerWithEventBody(
|
|
29
|
-
|
|
31
|
+
void invokeHandlerWithEventBody(
|
|
32
|
+
const std::string &eventName,
|
|
33
|
+
const std::unordered_map<std::string, EventValue> &body) override;
|
|
34
|
+
void invokeHandlerWithEventBody(
|
|
35
|
+
const std::string &eventName,
|
|
36
|
+
uint64_t listenerId,
|
|
37
|
+
const std::unordered_map<std::string, EventValue> &body) override;
|
|
30
38
|
|
|
31
39
|
private:
|
|
32
|
-
|
|
40
|
+
std::atomic<uint64_t> listenerIdCounter_{1}; // Atomic counter for listener IDs
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
std::shared_ptr<react::CallInvoker> callInvoker_;
|
|
43
|
+
jsi::Runtime *runtime_;
|
|
44
|
+
std::unordered_map<std::string, std::unordered_map<uint64_t, std::shared_ptr<jsi::Function>>>
|
|
45
|
+
eventHandlers_;
|
|
37
46
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
static constexpr std::array<std::string_view, 15> SYSTEM_EVENT_NAMES = {
|
|
48
|
+
"remotePlay",
|
|
49
|
+
"remotePause",
|
|
50
|
+
"remoteStop",
|
|
51
|
+
"remoteTogglePlayPause",
|
|
52
|
+
"remoteChangePlaybackRate",
|
|
53
|
+
"remoteNextTrack",
|
|
54
|
+
"remotePreviousTrack",
|
|
55
|
+
"remoteSkipForward",
|
|
56
|
+
"remoteSkipBackward",
|
|
57
|
+
"remoteSeekForward",
|
|
58
|
+
"remoteSeekBackward",
|
|
59
|
+
"remoteChangePlaybackPosition",
|
|
60
|
+
"routeChange",
|
|
61
|
+
"interruption",
|
|
62
|
+
"volumeChange",
|
|
63
|
+
};
|
|
55
64
|
|
|
56
|
-
|
|
57
|
-
"ended",
|
|
58
|
-
"loopEnded",
|
|
59
|
-
"audioReady",
|
|
60
|
-
"positionChanged",
|
|
61
|
-
"audioError",
|
|
62
|
-
"systemStateChanged"
|
|
63
|
-
};
|
|
65
|
+
static constexpr std::array<std::string_view, 6> AUDIO_API_EVENT_NAMES =
|
|
66
|
+
{"ended", "loopEnded", "audioReady", "positionChanged", "audioError", "systemStateChanged"};
|
|
64
67
|
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
jsi::Object createEventObject(const std::unordered_map<std::string, EventValue> &body);
|
|
69
|
+
jsi::Object createEventObject(
|
|
70
|
+
const std::unordered_map<std::string, EventValue> &body,
|
|
71
|
+
size_t memoryPressure);
|
|
67
72
|
};
|
|
68
73
|
|
|
69
74
|
} // namespace audioapi
|
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
-
#include <jsi/jsi.h>
|
|
4
3
|
#include <ReactCommon/CallInvoker.h>
|
|
4
|
+
#include <jsi/jsi.h>
|
|
5
|
+
#include <memory>
|
|
6
|
+
#include <string>
|
|
5
7
|
#include <unordered_map>
|
|
6
8
|
#include <variant>
|
|
7
|
-
#include <string>
|
|
8
|
-
#include <memory>
|
|
9
9
|
|
|
10
10
|
namespace audioapi {
|
|
11
11
|
|
|
12
|
-
using EventValue =
|
|
12
|
+
using EventValue =
|
|
13
|
+
std::variant<int, float, double, std::string, bool, std::shared_ptr<facebook::jsi::HostObject>>;
|
|
13
14
|
|
|
14
15
|
class IAudioEventHandlerRegistry {
|
|
15
16
|
public:
|
|
16
17
|
virtual ~IAudioEventHandlerRegistry() = default;
|
|
17
18
|
|
|
18
|
-
virtual uint64_t registerHandler(
|
|
19
|
+
virtual uint64_t registerHandler(
|
|
20
|
+
const std::string &eventName,
|
|
21
|
+
const std::shared_ptr<facebook::jsi::Function> &handler) = 0;
|
|
19
22
|
virtual void unregisterHandler(const std::string &eventName, uint64_t listenerId) = 0;
|
|
20
23
|
|
|
21
|
-
virtual void invokeHandlerWithEventBody(
|
|
22
|
-
|
|
24
|
+
virtual void invokeHandlerWithEventBody(
|
|
25
|
+
const std::string &eventName,
|
|
26
|
+
const std::unordered_map<std::string, EventValue> &body) = 0;
|
|
27
|
+
virtual void invokeHandlerWithEventBody(
|
|
28
|
+
const std::string &eventName,
|
|
29
|
+
uint64_t listenerId,
|
|
30
|
+
const std::unordered_map<std::string, EventValue> &body) = 0;
|
|
23
31
|
};
|
|
24
32
|
|
|
25
33
|
} // namespace audioapi
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
-
#include <jsi/jsi.h>
|
|
4
3
|
#include <audioapi/utils/AudioArray.h>
|
|
4
|
+
#include <jsi/jsi.h>
|
|
5
5
|
|
|
6
6
|
#include <memory>
|
|
7
7
|
#include <utility>
|
|
@@ -12,11 +12,11 @@ using namespace facebook;
|
|
|
12
12
|
|
|
13
13
|
class AudioArrayBuffer : public jsi::MutableBuffer {
|
|
14
14
|
public:
|
|
15
|
-
explicit AudioArrayBuffer(const std::shared_ptr<AudioArray> &audioArray)
|
|
15
|
+
explicit AudioArrayBuffer(const std::shared_ptr<AudioArray> &audioArray)
|
|
16
|
+
: audioArray_(audioArray) {}
|
|
16
17
|
~AudioArrayBuffer() override = default;
|
|
17
18
|
|
|
18
|
-
AudioArrayBuffer(AudioArrayBuffer &&other) noexcept
|
|
19
|
-
: audioArray_(std::move(other.audioArray_)) {
|
|
19
|
+
AudioArrayBuffer(AudioArrayBuffer &&other) noexcept : audioArray_(std::move(other.audioArray_)) {
|
|
20
20
|
other.audioArray_ = nullptr;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -32,4 +32,3 @@ class AudioArrayBuffer : public jsi::MutableBuffer {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
} // namespace audioapi
|
|
35
|
-
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#include <audioapi/jsi/JsiHostObject.h>
|
|
2
|
+
#include <memory>
|
|
3
|
+
#include <string>
|
|
4
|
+
#include <unordered_map>
|
|
5
|
+
#include <utility>
|
|
6
|
+
#include <vector>
|
|
2
7
|
|
|
3
8
|
// set this value to 1 in order to debug the construction/destruction
|
|
4
9
|
#define JSI_DEBUG_ALLOCATIONS 0
|
|
@@ -11,9 +16,8 @@ std::vector<JsiHostObject *> objects;
|
|
|
11
16
|
#endif
|
|
12
17
|
|
|
13
18
|
JsiHostObject::JsiHostObject() {
|
|
14
|
-
getters_ = std::make_unique<
|
|
15
|
-
std::string,
|
|
16
|
-
jsi::Value (JsiHostObject::*)(jsi::Runtime &)>>();
|
|
19
|
+
getters_ = std::make_unique<
|
|
20
|
+
std::unordered_map<std::string, jsi::Value (JsiHostObject::*)(jsi::Runtime &)>>();
|
|
17
21
|
functions_ = std::make_unique<std::unordered_map<
|
|
18
22
|
std::string,
|
|
19
23
|
jsi::Value (JsiHostObject::*)(
|
|
@@ -70,8 +74,7 @@ JsiHostObject::~JsiHostObject() {
|
|
|
70
74
|
|
|
71
75
|
std::vector<jsi::PropNameID> JsiHostObject::getPropertyNames(jsi::Runtime &rt) {
|
|
72
76
|
std::vector<jsi::PropNameID> propertyNames;
|
|
73
|
-
propertyNames.reserve(
|
|
74
|
-
getters_->size() + functions_->size() + setters_->size());
|
|
77
|
+
propertyNames.reserve(getters_->size() + functions_->size() + setters_->size());
|
|
75
78
|
|
|
76
79
|
for (const auto &it : *getters_) {
|
|
77
80
|
propertyNames.push_back(jsi::PropNameID::forUtf8(rt, it.first));
|
|
@@ -88,9 +91,7 @@ std::vector<jsi::PropNameID> JsiHostObject::getPropertyNames(jsi::Runtime &rt) {
|
|
|
88
91
|
return propertyNames;
|
|
89
92
|
}
|
|
90
93
|
|
|
91
|
-
jsi::Value JsiHostObject::get(
|
|
92
|
-
jsi::Runtime &runtime,
|
|
93
|
-
const jsi::PropNameID &name) {
|
|
94
|
+
jsi::Value JsiHostObject::get(jsi::Runtime &runtime, const jsi::PropNameID &name) {
|
|
94
95
|
auto nameAsString = name.utf8(runtime);
|
|
95
96
|
auto &hostFunctionCache = hostFunctionCache_.get(runtime);
|
|
96
97
|
|
|
@@ -117,9 +118,7 @@ jsi::Value JsiHostObject::get(
|
|
|
117
118
|
std::placeholders::_4);
|
|
118
119
|
|
|
119
120
|
return hostFunctionCache
|
|
120
|
-
.emplace(
|
|
121
|
-
nameAsString,
|
|
122
|
-
jsi::Function::createFromHostFunction(runtime, name, 0, dispatcher))
|
|
121
|
+
.emplace(nameAsString, jsi::Function::createFromHostFunction(runtime, name, 0, dispatcher))
|
|
123
122
|
.first->second.asFunction(runtime);
|
|
124
123
|
}
|
|
125
124
|
|
|
@@ -135,8 +134,7 @@ void JsiHostObject::set(
|
|
|
135
134
|
auto setter = setters_->find(nameAsString);
|
|
136
135
|
|
|
137
136
|
if (setter != setters_->end()) {
|
|
138
|
-
auto dispatcher = std::bind(
|
|
139
|
-
setter->second, this, std::placeholders::_1, std::placeholders::_2);
|
|
137
|
+
auto dispatcher = std::bind(setter->second, this, std::placeholders::_1, std::placeholders::_2);
|
|
140
138
|
|
|
141
139
|
return dispatcher(runtime, value);
|
|
142
140
|
}
|