react-native-audio-api 0.12.0-nightly-75589dc-20260121 → 0.12.0-nightly-6a44b58-20260123
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/java/com/swmansion/audioapi/AudioAPIModule.kt +16 -2
- package/android/src/main/java/com/swmansion/audioapi/system/AudioFocusListener.kt +7 -3
- package/android/src/main/java/com/swmansion/audioapi/system/MediaSessionManager.kt +6 -6
- package/common/cpp/audioapi/HostObjects/analysis/AnalyserNodeHostObject.cpp +4 -2
- package/common/cpp/audioapi/HostObjects/analysis/AnalyserNodeHostObject.h +1 -2
- package/common/cpp/audioapi/HostObjects/effects/BiquadFilterNodeHostObject.cpp +4 -2
- package/common/cpp/audioapi/HostObjects/effects/BiquadFilterNodeHostObject.h +1 -0
- package/common/cpp/audioapi/HostObjects/effects/WaveShaperNodeHostObject.cpp +4 -3
- package/common/cpp/audioapi/HostObjects/effects/WaveShaperNodeHostObject.h +2 -0
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferQueueSourceNodeHostObject.cpp +18 -0
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferQueueSourceNodeHostObject.h +4 -0
- package/common/cpp/audioapi/HostObjects/sources/OscillatorNodeHostObject.cpp +4 -2
- package/common/cpp/audioapi/HostObjects/sources/OscillatorNodeHostObject.h +1 -0
- package/common/cpp/audioapi/HostObjects/utils/JsEnumParser.cpp +127 -0
- package/common/cpp/audioapi/HostObjects/utils/JsEnumParser.h +17 -0
- package/common/cpp/audioapi/core/analysis/AnalyserNode.cpp +8 -8
- package/common/cpp/audioapi/core/analysis/AnalyserNode.h +2 -26
- package/common/cpp/audioapi/core/effects/BiquadFilterNode.cpp +4 -4
- package/common/cpp/audioapi/core/effects/BiquadFilterNode.h +3 -50
- package/common/cpp/audioapi/core/effects/WaveShaperNode.cpp +5 -5
- package/common/cpp/audioapi/core/effects/WaveShaperNode.h +2 -25
- package/common/cpp/audioapi/core/sources/AudioBufferQueueSourceNode.cpp +29 -14
- package/common/cpp/audioapi/core/sources/AudioBufferQueueSourceNode.h +7 -0
- package/common/cpp/audioapi/core/sources/AudioBufferSourceNode.cpp +1 -1
- package/common/cpp/audioapi/core/sources/AudioBufferSourceNode.h +1 -1
- package/common/cpp/audioapi/core/sources/OscillatorNode.cpp +4 -4
- package/common/cpp/audioapi/core/sources/OscillatorNode.h +2 -37
- package/common/cpp/audioapi/events/AudioEventHandlerRegistry.h +8 -2
- package/common/cpp/test/src/core/effects/WaveShaperNodeTest.cpp +2 -1
- package/development/react/package.json +6 -0
- package/ios/audioapi/ios/AudioAPIModule.h +2 -2
- package/ios/audioapi/ios/AudioAPIModule.mm +3 -3
- package/ios/audioapi/ios/system/AudioEngine.mm +3 -1
- package/ios/audioapi/ios/system/AudioSessionManager.h +1 -0
- package/ios/audioapi/ios/system/{NotificationManager.h → SystemNotificationManager.h} +1 -1
- package/ios/audioapi/ios/system/{NotificationManager.mm → SystemNotificationManager.mm} +9 -4
- package/lib/commonjs/core/AudioBufferQueueSourceNode.js +15 -0
- package/lib/commonjs/core/AudioBufferQueueSourceNode.js.map +1 -1
- package/lib/commonjs/core/AudioBufferSourceNode.js +0 -6
- package/lib/commonjs/core/AudioBufferSourceNode.js.map +1 -1
- package/lib/commonjs/core/AudioScheduledSourceNode.js.map +1 -1
- package/lib/commonjs/core/BaseAudioContext.js +2 -2
- package/lib/commonjs/core/BaseAudioContext.js.map +1 -1
- package/lib/commonjs/core/OscillatorNode.js +0 -6
- package/lib/commonjs/core/OscillatorNode.js.map +1 -1
- package/lib/commonjs/development/react/Audio/Audio.js +26 -0
- package/lib/commonjs/development/react/Audio/Audio.js.map +1 -0
- package/lib/commonjs/development/react/Audio/Audio.web.js +12 -0
- package/lib/commonjs/development/react/Audio/Audio.web.js.map +1 -0
- package/lib/commonjs/development/react/Audio/index.js +14 -0
- package/lib/commonjs/development/react/Audio/index.js.map +1 -0
- package/lib/commonjs/development/react/Audio/types.js +2 -0
- package/lib/commonjs/development/react/Audio/types.js.map +1 -0
- package/lib/commonjs/development/react/Audio/utils.js +67 -0
- package/lib/commonjs/development/react/Audio/utils.js.map +1 -0
- package/lib/commonjs/development/react/index.js +28 -0
- package/lib/commonjs/development/react/index.js.map +1 -0
- package/lib/commonjs/specs/NativeAudioAPIModule.js.map +1 -1
- package/lib/commonjs/specs/NativeAudioAPIModule.web.js.map +1 -1
- package/lib/commonjs/system/AudioManager.js +7 -2
- package/lib/commonjs/system/AudioManager.js.map +1 -1
- package/lib/commonjs/web-core/AudioScheduledSourceNode.js +4 -2
- package/lib/commonjs/web-core/AudioScheduledSourceNode.js.map +1 -1
- package/lib/module/core/AudioBufferQueueSourceNode.js +15 -0
- package/lib/module/core/AudioBufferQueueSourceNode.js.map +1 -1
- package/lib/module/core/AudioBufferSourceNode.js +0 -6
- package/lib/module/core/AudioBufferSourceNode.js.map +1 -1
- package/lib/module/core/AudioScheduledSourceNode.js.map +1 -1
- package/lib/module/core/BaseAudioContext.js +2 -2
- package/lib/module/core/BaseAudioContext.js.map +1 -1
- package/lib/module/core/OscillatorNode.js +0 -6
- package/lib/module/core/OscillatorNode.js.map +1 -1
- package/lib/module/development/react/Audio/Audio.js +22 -0
- package/lib/module/development/react/Audio/Audio.js.map +1 -0
- package/lib/module/development/react/Audio/Audio.web.js +8 -0
- package/lib/module/development/react/Audio/Audio.web.js.map +1 -0
- package/lib/module/development/react/Audio/index.js +4 -0
- package/lib/module/development/react/Audio/index.js.map +1 -0
- package/lib/module/development/react/Audio/types.js +2 -0
- package/lib/module/development/react/Audio/types.js.map +1 -0
- package/lib/module/development/react/Audio/utils.js +62 -0
- package/lib/module/development/react/Audio/utils.js.map +1 -0
- package/lib/module/development/react/index.js +5 -0
- package/lib/module/development/react/index.js.map +1 -0
- package/lib/module/specs/NativeAudioAPIModule.js.map +1 -1
- package/lib/module/specs/NativeAudioAPIModule.web.js.map +1 -1
- package/lib/module/system/AudioManager.js +7 -2
- package/lib/module/system/AudioManager.js.map +1 -1
- package/lib/module/web-core/AudioScheduledSourceNode.js +4 -2
- package/lib/module/web-core/AudioScheduledSourceNode.js.map +1 -1
- package/lib/typescript/core/AudioBufferQueueSourceNode.d.ts +5 -0
- package/lib/typescript/core/AudioBufferQueueSourceNode.d.ts.map +1 -1
- package/lib/typescript/core/AudioBufferSourceNode.d.ts +0 -2
- package/lib/typescript/core/AudioBufferSourceNode.d.ts.map +1 -1
- package/lib/typescript/core/AudioScheduledSourceNode.d.ts +3 -3
- package/lib/typescript/core/AudioScheduledSourceNode.d.ts.map +1 -1
- package/lib/typescript/core/BaseAudioContext.d.ts +4 -4
- package/lib/typescript/core/BaseAudioContext.d.ts.map +1 -1
- package/lib/typescript/core/OscillatorNode.d.ts +0 -3
- package/lib/typescript/core/OscillatorNode.d.ts.map +1 -1
- package/lib/typescript/development/react/Audio/Audio.d.ts +5 -0
- package/lib/typescript/development/react/Audio/Audio.d.ts.map +1 -0
- package/lib/typescript/development/react/Audio/Audio.web.d.ts +5 -0
- package/lib/typescript/development/react/Audio/Audio.web.d.ts.map +1 -0
- package/lib/typescript/development/react/Audio/index.d.ts +3 -0
- package/lib/typescript/development/react/Audio/index.d.ts.map +1 -0
- package/lib/typescript/development/react/Audio/types.d.ts +47 -0
- package/lib/typescript/development/react/Audio/types.d.ts.map +1 -0
- package/lib/typescript/development/react/Audio/utils.d.ts +4 -0
- package/lib/typescript/development/react/Audio/utils.d.ts.map +1 -0
- package/lib/typescript/development/react/index.d.ts +3 -0
- package/lib/typescript/development/react/index.d.ts.map +1 -0
- package/lib/typescript/events/types.d.ts +6 -4
- package/lib/typescript/events/types.d.ts.map +1 -1
- package/lib/typescript/interfaces.d.ts +1 -0
- package/lib/typescript/interfaces.d.ts.map +1 -1
- package/lib/typescript/specs/NativeAudioAPIModule.d.ts +2 -1
- package/lib/typescript/specs/NativeAudioAPIModule.d.ts.map +1 -1
- package/lib/typescript/specs/NativeAudioAPIModule.web.d.ts +2 -2
- package/lib/typescript/specs/NativeAudioAPIModule.web.d.ts.map +1 -1
- package/lib/typescript/system/AudioManager.d.ts +2 -2
- package/lib/typescript/system/AudioManager.d.ts.map +1 -1
- package/lib/typescript/system/types.d.ts +2 -1
- package/lib/typescript/system/types.d.ts.map +1 -1
- package/lib/typescript/web-core/AudioScheduledSourceNode.d.ts +2 -0
- package/lib/typescript/web-core/AudioScheduledSourceNode.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/core/AudioBufferQueueSourceNode.ts +31 -0
- package/src/core/AudioBufferSourceNode.ts +0 -10
- package/src/core/AudioScheduledSourceNode.ts +4 -4
- package/src/core/BaseAudioContext.ts +6 -6
- package/src/core/OscillatorNode.ts +0 -11
- package/src/development/react/Audio/Audio.tsx +24 -0
- package/src/development/react/Audio/Audio.web.tsx +9 -0
- package/src/development/react/Audio/index.ts +3 -0
- package/src/development/react/Audio/types.ts +64 -0
- package/src/development/react/Audio/utils.ts +86 -0
- package/src/development/react/index.ts +2 -0
- package/src/events/types.ts +6 -4
- package/src/interfaces.ts +3 -0
- package/src/specs/NativeAudioAPIModule.ts +6 -1
- package/src/specs/NativeAudioAPIModule.web.ts +6 -2
- package/src/system/AudioManager.ts +8 -2
- package/src/system/types.ts +7 -1
- package/src/web-core/AudioScheduledSourceNode.tsx +6 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package com.swmansion.audioapi
|
|
2
2
|
|
|
3
|
+
import android.media.AudioManager
|
|
3
4
|
import androidx.annotation.RequiresPermission
|
|
4
5
|
import com.facebook.jni.HybridData
|
|
5
6
|
import com.facebook.react.bridge.Arguments
|
|
@@ -115,8 +116,21 @@ class AudioAPIModule(
|
|
|
115
116
|
// nothing to do here
|
|
116
117
|
}
|
|
117
118
|
|
|
118
|
-
override fun observeAudioInterruptions(
|
|
119
|
-
|
|
119
|
+
override fun observeAudioInterruptions(
|
|
120
|
+
focusType: String?,
|
|
121
|
+
enabled: Boolean,
|
|
122
|
+
) {
|
|
123
|
+
if (!enabled) {
|
|
124
|
+
MediaSessionManager.abandonAudioFocus()
|
|
125
|
+
return
|
|
126
|
+
}
|
|
127
|
+
when (focusType) {
|
|
128
|
+
"gain" -> MediaSessionManager.requestAudioFocus(AudioManager.AUDIOFOCUS_GAIN)
|
|
129
|
+
"gainTransient" -> MediaSessionManager.requestAudioFocus(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT)
|
|
130
|
+
"gainTransientMayDuck" -> MediaSessionManager.requestAudioFocus(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK)
|
|
131
|
+
"gainTransientExclusive" -> MediaSessionManager.requestAudioFocus(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE)
|
|
132
|
+
else -> MediaSessionManager.requestAudioFocus(AudioManager.AUDIOFOCUS_GAIN)
|
|
133
|
+
}
|
|
120
134
|
}
|
|
121
135
|
|
|
122
136
|
override fun activelyReclaimSession(enabled: Boolean) {
|
|
@@ -47,20 +47,24 @@ class AudioFocusListener(
|
|
|
47
47
|
}
|
|
48
48
|
audioAPIModule.get()?.invokeHandlerWithEventNameAndEventBody("interruption", body)
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK -> {
|
|
52
|
+
audioAPIModule.get()?.invokeHandlerWithEventNameAndEventBody("duck", emptyMap())
|
|
53
|
+
}
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
56
|
|
|
53
|
-
fun requestAudioFocus() {
|
|
57
|
+
fun requestAudioFocus(focus: Int) {
|
|
54
58
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
55
59
|
this.focusRequest =
|
|
56
60
|
AudioFocusRequest
|
|
57
|
-
.Builder(
|
|
61
|
+
.Builder(focus)
|
|
58
62
|
.setOnAudioFocusChangeListener(this)
|
|
59
63
|
.build()
|
|
60
64
|
|
|
61
65
|
audioManager.get()?.requestAudioFocus(focusRequest!!)
|
|
62
66
|
} else {
|
|
63
|
-
audioManager.get()?.requestAudioFocus(this, AudioManager.STREAM_MUSIC,
|
|
67
|
+
audioManager.get()?.requestAudioFocus(this, AudioManager.STREAM_MUSIC, focus)
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
|
|
@@ -88,12 +88,12 @@ object MediaSessionManager {
|
|
|
88
88
|
return sampleRate.toDouble()
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
fun
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
fun requestAudioFocus(focus: Int) {
|
|
92
|
+
audioFocusListener.requestAudioFocus(focus)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
fun abandonAudioFocus() {
|
|
96
|
+
audioFocusListener.abandonAudioFocus()
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
fun activelyReclaimSession(enabled: Boolean) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#include <audioapi/HostObjects/analysis/AnalyserNodeHostObject.h>
|
|
2
2
|
|
|
3
3
|
#include <audioapi/core/analysis/AnalyserNode.h>
|
|
4
|
+
#include <audioapi/HostObjects/utils/JsEnumParser.h>
|
|
4
5
|
#include <memory>
|
|
5
6
|
|
|
6
7
|
namespace audioapi {
|
|
@@ -57,7 +58,7 @@ JSI_PROPERTY_GETTER_IMPL(AnalyserNodeHostObject, smoothingTimeConstant) {
|
|
|
57
58
|
JSI_PROPERTY_GETTER_IMPL(AnalyserNodeHostObject, window) {
|
|
58
59
|
auto analyserNode = std::static_pointer_cast<AnalyserNode>(node_);
|
|
59
60
|
auto windowType = analyserNode->getWindowType();
|
|
60
|
-
return jsi::String::createFromUtf8(runtime, windowType);
|
|
61
|
+
return jsi::String::createFromUtf8(runtime, js_enum_parser::windowTypeToString(windowType));
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
JSI_PROPERTY_SETTER_IMPL(AnalyserNodeHostObject, fftSize) {
|
|
@@ -86,7 +87,8 @@ JSI_PROPERTY_SETTER_IMPL(AnalyserNodeHostObject, smoothingTimeConstant) {
|
|
|
86
87
|
|
|
87
88
|
JSI_PROPERTY_SETTER_IMPL(AnalyserNodeHostObject, window) {
|
|
88
89
|
auto analyserNode = std::static_pointer_cast<AnalyserNode>(node_);
|
|
89
|
-
|
|
90
|
+
auto type = value.asString(runtime).utf8(runtime);
|
|
91
|
+
analyserNode->setWindowType(js_enum_parser::windowTypeFromString(type));
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
JSI_HOST_FUNCTION_IMPL(AnalyserNodeHostObject, getFloatFrequencyData) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
3
|
#include <audioapi/HostObjects/AudioNodeHostObject.h>
|
|
4
|
+
#include <audioapi/core/analysis/AnalyserNode.h>
|
|
4
5
|
|
|
5
6
|
#include <memory>
|
|
6
7
|
#include <string>
|
|
@@ -9,8 +10,6 @@
|
|
|
9
10
|
namespace audioapi {
|
|
10
11
|
using namespace facebook;
|
|
11
12
|
|
|
12
|
-
class AnalyserNode;
|
|
13
|
-
|
|
14
13
|
class AnalyserNodeHostObject : public AudioNodeHostObject {
|
|
15
14
|
public:
|
|
16
15
|
explicit AnalyserNodeHostObject(const std::shared_ptr<AnalyserNode> &node);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#include <audioapi/HostObjects/AudioParamHostObject.h>
|
|
4
4
|
#include <audioapi/core/effects/BiquadFilterNode.h>
|
|
5
|
+
#include <audioapi/HostObjects/utils/JsEnumParser.h>
|
|
5
6
|
#include <memory>
|
|
6
7
|
|
|
7
8
|
namespace audioapi {
|
|
@@ -49,12 +50,13 @@ JSI_PROPERTY_GETTER_IMPL(BiquadFilterNodeHostObject, gain) {
|
|
|
49
50
|
JSI_PROPERTY_GETTER_IMPL(BiquadFilterNodeHostObject, type) {
|
|
50
51
|
auto biquadFilterNode = std::static_pointer_cast<BiquadFilterNode>(node_);
|
|
51
52
|
auto type = biquadFilterNode->getType();
|
|
52
|
-
return jsi::String::createFromUtf8(runtime, type);
|
|
53
|
+
return jsi::String::createFromUtf8(runtime, js_enum_parser::filterTypeToString(type));
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
JSI_PROPERTY_SETTER_IMPL(BiquadFilterNodeHostObject, type) {
|
|
56
57
|
auto biquadFilterNode = std::static_pointer_cast<BiquadFilterNode>(node_);
|
|
57
|
-
|
|
58
|
+
auto type = value.asString(runtime).utf8(runtime);
|
|
59
|
+
biquadFilterNode->setType(js_enum_parser::filterTypeFromString(type));
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
JSI_HOST_FUNCTION_IMPL(BiquadFilterNodeHostObject, getFrequencyResponse) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#include <audioapi/HostObjects/effects/WaveShaperNodeHostObject.h>
|
|
2
2
|
#include <audioapi/core/effects/WaveShaperNode.h>
|
|
3
3
|
#include <audioapi/jsi/AudioArrayBuffer.h>
|
|
4
|
+
#include <audioapi/HostObjects/utils/JsEnumParser.h>
|
|
4
5
|
|
|
5
6
|
#include <memory>
|
|
6
7
|
#include <string>
|
|
@@ -19,7 +20,7 @@ WaveShaperNodeHostObject::WaveShaperNodeHostObject(const std::shared_ptr<WaveSha
|
|
|
19
20
|
|
|
20
21
|
JSI_PROPERTY_GETTER_IMPL(WaveShaperNodeHostObject, oversample) {
|
|
21
22
|
auto waveShaperNode = std::static_pointer_cast<WaveShaperNode>(node_);
|
|
22
|
-
return jsi::String::createFromUtf8(runtime, waveShaperNode->getOversample());
|
|
23
|
+
return jsi::String::createFromUtf8(runtime, js_enum_parser::overSampleTypeToString(waveShaperNode->getOversample()));
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
JSI_PROPERTY_GETTER_IMPL(WaveShaperNodeHostObject, curve) {
|
|
@@ -44,8 +45,8 @@ JSI_PROPERTY_GETTER_IMPL(WaveShaperNodeHostObject, curve) {
|
|
|
44
45
|
|
|
45
46
|
JSI_PROPERTY_SETTER_IMPL(WaveShaperNodeHostObject, oversample) {
|
|
46
47
|
auto waveShaperNode = std::static_pointer_cast<WaveShaperNode>(node_);
|
|
47
|
-
|
|
48
|
-
waveShaperNode->setOversample(type);
|
|
48
|
+
auto type = value.asString(runtime).utf8(runtime);
|
|
49
|
+
waveShaperNode->setOversample(js_enum_parser::overSampleTypeFromString(type));
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
JSI_HOST_FUNCTION_IMPL(WaveShaperNodeHostObject, setCurve) {
|
|
@@ -11,6 +11,9 @@ AudioBufferQueueSourceNodeHostObject::AudioBufferQueueSourceNodeHostObject(
|
|
|
11
11
|
: AudioBufferBaseSourceNodeHostObject(node) {
|
|
12
12
|
functions_->erase("start");
|
|
13
13
|
|
|
14
|
+
addSetters(
|
|
15
|
+
JSI_EXPORT_PROPERTY_SETTER(AudioBufferQueueSourceNodeHostObject, onBufferEnded));
|
|
16
|
+
|
|
14
17
|
addFunctions(
|
|
15
18
|
JSI_EXPORT_FUNCTION(AudioBufferQueueSourceNodeHostObject, start),
|
|
16
19
|
JSI_EXPORT_FUNCTION(AudioBufferQueueSourceNodeHostObject, enqueueBuffer),
|
|
@@ -19,6 +22,21 @@ AudioBufferQueueSourceNodeHostObject::AudioBufferQueueSourceNodeHostObject(
|
|
|
19
22
|
JSI_EXPORT_FUNCTION(AudioBufferQueueSourceNodeHostObject, pause));
|
|
20
23
|
}
|
|
21
24
|
|
|
25
|
+
AudioBufferQueueSourceNodeHostObject::~AudioBufferQueueSourceNodeHostObject() {
|
|
26
|
+
auto audioBufferQueueSourceNode = std::static_pointer_cast<AudioBufferQueueSourceNode>(node_);
|
|
27
|
+
|
|
28
|
+
// When JSI object is garbage collected (together with the eventual callback),
|
|
29
|
+
// underlying source node might still be active and try to call the
|
|
30
|
+
// non-existing callback.
|
|
31
|
+
audioBufferQueueSourceNode->setOnBufferEndedCallbackId(0);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
JSI_PROPERTY_SETTER_IMPL(AudioBufferQueueSourceNodeHostObject, onBufferEnded) {
|
|
35
|
+
auto audioBufferQueueSourceNode = std::static_pointer_cast<AudioBufferQueueSourceNode>(node_);
|
|
36
|
+
|
|
37
|
+
audioBufferQueueSourceNode->setOnBufferEndedCallbackId(std::stoull(value.getString(runtime).utf8(runtime)));
|
|
38
|
+
}
|
|
39
|
+
|
|
22
40
|
JSI_HOST_FUNCTION_IMPL(AudioBufferQueueSourceNodeHostObject, start) {
|
|
23
41
|
auto when = args[0].getNumber();
|
|
24
42
|
|
|
@@ -15,6 +15,10 @@ class AudioBufferQueueSourceNodeHostObject : public AudioBufferBaseSourceNodeHos
|
|
|
15
15
|
explicit AudioBufferQueueSourceNodeHostObject(
|
|
16
16
|
const std::shared_ptr<AudioBufferQueueSourceNode> &node);
|
|
17
17
|
|
|
18
|
+
~AudioBufferQueueSourceNodeHostObject() override;
|
|
19
|
+
|
|
20
|
+
JSI_PROPERTY_SETTER_DECL(onBufferEnded);
|
|
21
|
+
|
|
18
22
|
JSI_HOST_FUNCTION_DECL(start);
|
|
19
23
|
JSI_HOST_FUNCTION_DECL(pause);
|
|
20
24
|
JSI_HOST_FUNCTION_DECL(enqueueBuffer);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
#include <audioapi/HostObjects/AudioParamHostObject.h>
|
|
4
4
|
#include <audioapi/HostObjects/effects/PeriodicWaveHostObject.h>
|
|
5
5
|
#include <audioapi/core/sources/OscillatorNode.h>
|
|
6
|
+
#include <audioapi/HostObjects/utils/JsEnumParser.h>
|
|
6
7
|
#include <memory>
|
|
7
8
|
|
|
8
9
|
namespace audioapi {
|
|
@@ -35,7 +36,7 @@ JSI_PROPERTY_GETTER_IMPL(OscillatorNodeHostObject, detune) {
|
|
|
35
36
|
JSI_PROPERTY_GETTER_IMPL(OscillatorNodeHostObject, type) {
|
|
36
37
|
auto oscillatorNode = std::static_pointer_cast<OscillatorNode>(node_);
|
|
37
38
|
auto waveType = oscillatorNode->getType();
|
|
38
|
-
return jsi::String::createFromUtf8(runtime, waveType);
|
|
39
|
+
return jsi::String::createFromUtf8(runtime, js_enum_parser::oscillatorTypeToString(waveType));
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
JSI_HOST_FUNCTION_IMPL(OscillatorNodeHostObject, setPeriodicWave) {
|
|
@@ -47,7 +48,8 @@ JSI_HOST_FUNCTION_IMPL(OscillatorNodeHostObject, setPeriodicWave) {
|
|
|
47
48
|
|
|
48
49
|
JSI_PROPERTY_SETTER_IMPL(OscillatorNodeHostObject, type) {
|
|
49
50
|
auto oscillatorNode = std::static_pointer_cast<OscillatorNode>(node_);
|
|
50
|
-
|
|
51
|
+
auto type = value.asString(runtime).utf8(runtime);
|
|
52
|
+
oscillatorNode->setType(js_enum_parser::oscillatorTypeFromString(type));
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
} // namespace audioapi
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
#include <audioapi/HostObjects/utils/JsEnumParser.h>
|
|
2
|
+
#include <string>
|
|
3
|
+
|
|
4
|
+
using WindowType = audioapi::AnalyserNode::WindowType;
|
|
5
|
+
|
|
6
|
+
namespace audioapi::js_enum_parser {
|
|
7
|
+
|
|
8
|
+
WindowType windowTypeFromString(const std::string &type) {
|
|
9
|
+
if (type == "blackman") {
|
|
10
|
+
return WindowType::BLACKMAN;
|
|
11
|
+
}
|
|
12
|
+
if (type == "hann") {
|
|
13
|
+
return WindowType::HANN;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
throw std::invalid_argument("Unknown window type");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
std::string windowTypeToString(WindowType type) {
|
|
21
|
+
switch (type) {
|
|
22
|
+
case WindowType::BLACKMAN:
|
|
23
|
+
return "blackman";
|
|
24
|
+
case WindowType::HANN:
|
|
25
|
+
return "hann";
|
|
26
|
+
default:
|
|
27
|
+
throw std::invalid_argument("Unknown window type");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
BiquadFilterType filterTypeFromString(const std::string &type) {
|
|
32
|
+
if (type == "lowpass")
|
|
33
|
+
return BiquadFilterType::LOWPASS;
|
|
34
|
+
if (type == "highpass")
|
|
35
|
+
return BiquadFilterType::HIGHPASS;
|
|
36
|
+
if (type == "bandpass")
|
|
37
|
+
return BiquadFilterType::BANDPASS;
|
|
38
|
+
if (type == "lowshelf")
|
|
39
|
+
return BiquadFilterType::LOWSHELF;
|
|
40
|
+
if (type == "highshelf")
|
|
41
|
+
return BiquadFilterType::HIGHSHELF;
|
|
42
|
+
if (type == "peaking")
|
|
43
|
+
return BiquadFilterType::PEAKING;
|
|
44
|
+
if (type == "notch")
|
|
45
|
+
return BiquadFilterType::NOTCH;
|
|
46
|
+
if (type == "allpass")
|
|
47
|
+
return BiquadFilterType::ALLPASS;
|
|
48
|
+
|
|
49
|
+
throw std::invalid_argument("Invalid filter type: " + type);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
std::string filterTypeToString(BiquadFilterType type) {
|
|
53
|
+
switch (type) {
|
|
54
|
+
case BiquadFilterType::LOWPASS:
|
|
55
|
+
return "lowpass";
|
|
56
|
+
case BiquadFilterType::HIGHPASS:
|
|
57
|
+
return "highpass";
|
|
58
|
+
case BiquadFilterType::BANDPASS:
|
|
59
|
+
return "bandpass";
|
|
60
|
+
case BiquadFilterType::LOWSHELF:
|
|
61
|
+
return "lowshelf";
|
|
62
|
+
case BiquadFilterType::HIGHSHELF:
|
|
63
|
+
return "highshelf";
|
|
64
|
+
case BiquadFilterType::PEAKING:
|
|
65
|
+
return "peaking";
|
|
66
|
+
case BiquadFilterType::NOTCH:
|
|
67
|
+
return "notch";
|
|
68
|
+
case BiquadFilterType::ALLPASS:
|
|
69
|
+
return "allpass";
|
|
70
|
+
default:
|
|
71
|
+
throw std::invalid_argument("Unknown filter type");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
OverSampleType overSampleTypeFromString(const std::string &type) {
|
|
76
|
+
if (type == "2x")
|
|
77
|
+
return OverSampleType::OVERSAMPLE_2X;
|
|
78
|
+
if (type == "4x")
|
|
79
|
+
return OverSampleType::OVERSAMPLE_4X;
|
|
80
|
+
|
|
81
|
+
return OverSampleType::OVERSAMPLE_NONE;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
std::string overSampleTypeToString(OverSampleType type) {
|
|
85
|
+
switch (type) {
|
|
86
|
+
case OverSampleType::OVERSAMPLE_2X:
|
|
87
|
+
return "2x";
|
|
88
|
+
case OverSampleType::OVERSAMPLE_4X:
|
|
89
|
+
return "4x";
|
|
90
|
+
default:
|
|
91
|
+
return "none";
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
OscillatorType oscillatorTypeFromString(const std::string &type) {
|
|
96
|
+
if (type == "sine")
|
|
97
|
+
return OscillatorType::SINE;
|
|
98
|
+
if (type == "square")
|
|
99
|
+
return OscillatorType::SQUARE;
|
|
100
|
+
if (type == "sawtooth")
|
|
101
|
+
return OscillatorType::SAWTOOTH;
|
|
102
|
+
if (type == "triangle")
|
|
103
|
+
return OscillatorType::TRIANGLE;
|
|
104
|
+
if (type == "custom")
|
|
105
|
+
return OscillatorType::CUSTOM;
|
|
106
|
+
|
|
107
|
+
throw std::invalid_argument("Unknown oscillator type: " + type);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
std::string oscillatorTypeToString(OscillatorType type) {
|
|
111
|
+
switch (type) {
|
|
112
|
+
case OscillatorType::SINE:
|
|
113
|
+
return "sine";
|
|
114
|
+
case OscillatorType::SQUARE:
|
|
115
|
+
return "square";
|
|
116
|
+
case OscillatorType::SAWTOOTH:
|
|
117
|
+
return "sawtooth";
|
|
118
|
+
case OscillatorType::TRIANGLE:
|
|
119
|
+
return "triangle";
|
|
120
|
+
case OscillatorType::CUSTOM:
|
|
121
|
+
return "custom";
|
|
122
|
+
default:
|
|
123
|
+
throw std::invalid_argument("Unknown oscillator type");
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
} // namespace audioapi::js_enum_parser
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include <audioapi/core/analysis/AnalyserNode.h>
|
|
3
|
+
#include <audioapi/core/types/BiquadFilterType.h>
|
|
4
|
+
#include <audioapi/core/types/OscillatorType.h>
|
|
5
|
+
#include <audioapi/core/types/OverSampleType.h>
|
|
6
|
+
#include <string>
|
|
7
|
+
|
|
8
|
+
namespace audioapi::js_enum_parser {
|
|
9
|
+
std::string windowTypeToString(AnalyserNode::WindowType type);
|
|
10
|
+
AnalyserNode::WindowType windowTypeFromString(const std::string &type);
|
|
11
|
+
std::string overSampleTypeToString(OverSampleType type);
|
|
12
|
+
OverSampleType overSampleTypeFromString(const std::string &type);
|
|
13
|
+
std::string oscillatorTypeToString(OscillatorType type);
|
|
14
|
+
OscillatorType oscillatorTypeFromString(const std::string &type);
|
|
15
|
+
std::string filterTypeToString(BiquadFilterType type);
|
|
16
|
+
BiquadFilterType filterTypeFromString(const std::string &type);
|
|
17
|
+
} // namespace audioapi::js_enum_parser
|
|
@@ -51,8 +51,8 @@ float AnalyserNode::getSmoothingTimeConstant() const {
|
|
|
51
51
|
return smoothingTimeConstant_;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
return
|
|
54
|
+
AnalyserNode::WindowType AnalyserNode::getWindowType() const {
|
|
55
|
+
return windowType_;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
void AnalyserNode::setFftSize(int fftSize) {
|
|
@@ -80,9 +80,8 @@ void AnalyserNode::setSmoothingTimeConstant(float smoothingTimeConstant) {
|
|
|
80
80
|
smoothingTimeConstant_ = smoothingTimeConstant;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
void AnalyserNode::setWindowType(
|
|
84
|
-
setWindowData(
|
|
85
|
-
windowType_ = AnalyserNode::fromString(type);
|
|
83
|
+
void AnalyserNode::setWindowType(AnalyserNode::WindowType type) {
|
|
84
|
+
setWindowData(type, fftSize_);
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
void AnalyserNode::getFloatFrequencyData(float *data, int length) {
|
|
@@ -189,12 +188,13 @@ void AnalyserNode::doFFTAnalysis() {
|
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
190
|
|
|
192
|
-
void AnalyserNode::setWindowData(
|
|
193
|
-
if (windowType_ == type && windowData_ && windowData_->getSize() == size) {
|
|
191
|
+
void AnalyserNode::setWindowData(AnalyserNode::WindowType type, int size) {
|
|
192
|
+
if (windowType_ == type && windowData_ != nullptr && windowData_->getSize() == size) {
|
|
194
193
|
return;
|
|
195
194
|
}
|
|
196
195
|
|
|
197
|
-
|
|
196
|
+
windowType_ = type;
|
|
197
|
+
if (windowData_ == nullptr|| windowData_->getSize() != size) {
|
|
198
198
|
windowData_ = std::make_shared<AudioArray>(size);
|
|
199
199
|
}
|
|
200
200
|
|
|
@@ -27,13 +27,13 @@ class AnalyserNode : public AudioNode {
|
|
|
27
27
|
float getMinDecibels() const;
|
|
28
28
|
float getMaxDecibels() const;
|
|
29
29
|
float getSmoothingTimeConstant() const;
|
|
30
|
-
|
|
30
|
+
AnalyserNode::WindowType getWindowType() const;
|
|
31
31
|
|
|
32
32
|
void setFftSize(int fftSize);
|
|
33
33
|
void setMinDecibels(float minDecibels);
|
|
34
34
|
void setMaxDecibels(float maxDecibels);
|
|
35
35
|
void setSmoothingTimeConstant(float smoothingTimeConstant);
|
|
36
|
-
void setWindowType(
|
|
36
|
+
void setWindowType(AnalyserNode::WindowType);
|
|
37
37
|
|
|
38
38
|
void getFloatFrequencyData(float *data, int length);
|
|
39
39
|
void getByteFrequencyData(uint8_t *data, int length);
|
|
@@ -63,30 +63,6 @@ class AnalyserNode : public AudioNode {
|
|
|
63
63
|
std::unique_ptr<AudioArray> magnitudeBuffer_;
|
|
64
64
|
bool shouldDoFFTAnalysis_{true};
|
|
65
65
|
|
|
66
|
-
static WindowType fromString(const std::string &type) {
|
|
67
|
-
std::string lowerType = type;
|
|
68
|
-
std::transform(lowerType.begin(), lowerType.end(), lowerType.begin(), ::tolower);
|
|
69
|
-
if (lowerType == "blackman") {
|
|
70
|
-
return WindowType::BLACKMAN;
|
|
71
|
-
}
|
|
72
|
-
if (lowerType == "hann") {
|
|
73
|
-
return WindowType::HANN;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
throw std::invalid_argument("Unknown window type");
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
static std::string toString(WindowType type) {
|
|
80
|
-
switch (type) {
|
|
81
|
-
case WindowType::BLACKMAN:
|
|
82
|
-
return "blackman";
|
|
83
|
-
case WindowType::HANN:
|
|
84
|
-
return "hann";
|
|
85
|
-
default:
|
|
86
|
-
throw std::invalid_argument("Unknown window type");
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
66
|
void doFFTAnalysis();
|
|
91
67
|
|
|
92
68
|
void setWindowData(WindowType type, int size);
|
|
@@ -59,12 +59,12 @@ BiquadFilterNode::BiquadFilterNode(std::shared_ptr<BaseAudioContext> context, co
|
|
|
59
59
|
isInitialized_ = true;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
return
|
|
62
|
+
BiquadFilterType BiquadFilterNode::getType() {
|
|
63
|
+
return type_;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
void BiquadFilterNode::setType(
|
|
67
|
-
type_ =
|
|
66
|
+
void BiquadFilterNode::setType(BiquadFilterType type) {
|
|
67
|
+
type_ = type;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
std::shared_ptr<AudioParam> BiquadFilterNode::getFrequencyParam() const {
|
|
@@ -59,8 +59,8 @@ class BiquadFilterNode : public AudioNode {
|
|
|
59
59
|
std::shared_ptr<BaseAudioContext> context,
|
|
60
60
|
const BiquadFilterOptions &options);
|
|
61
61
|
|
|
62
|
-
[[nodiscard]]
|
|
63
|
-
void setType(
|
|
62
|
+
[[nodiscard]] BiquadFilterType getType();
|
|
63
|
+
void setType(BiquadFilterType);
|
|
64
64
|
[[nodiscard]] std::shared_ptr<AudioParam> getFrequencyParam() const;
|
|
65
65
|
[[nodiscard]] std::shared_ptr<AudioParam> getDetuneParam() const;
|
|
66
66
|
[[nodiscard]] std::shared_ptr<AudioParam> getQParam() const;
|
|
@@ -81,7 +81,7 @@ class BiquadFilterNode : public AudioNode {
|
|
|
81
81
|
std::shared_ptr<AudioParam> detuneParam_;
|
|
82
82
|
std::shared_ptr<AudioParam> QParam_;
|
|
83
83
|
std::shared_ptr<AudioParam> gainParam_;
|
|
84
|
-
|
|
84
|
+
BiquadFilterType type_;
|
|
85
85
|
|
|
86
86
|
// delayed samples, one per channel
|
|
87
87
|
std::vector<float> x1_;
|
|
@@ -96,53 +96,6 @@ class BiquadFilterNode : public AudioNode {
|
|
|
96
96
|
float a1_ = 0;
|
|
97
97
|
float a2_ = 0;
|
|
98
98
|
|
|
99
|
-
static BiquadFilterType fromString(const std::string &type) {
|
|
100
|
-
std::string lowerType = type;
|
|
101
|
-
std::transform(lowerType.begin(), lowerType.end(), lowerType.begin(), ::tolower);
|
|
102
|
-
|
|
103
|
-
if (lowerType == "lowpass")
|
|
104
|
-
return BiquadFilterType::LOWPASS;
|
|
105
|
-
if (lowerType == "highpass")
|
|
106
|
-
return BiquadFilterType::HIGHPASS;
|
|
107
|
-
if (lowerType == "bandpass")
|
|
108
|
-
return BiquadFilterType::BANDPASS;
|
|
109
|
-
if (lowerType == "lowshelf")
|
|
110
|
-
return BiquadFilterType::LOWSHELF;
|
|
111
|
-
if (lowerType == "highshelf")
|
|
112
|
-
return BiquadFilterType::HIGHSHELF;
|
|
113
|
-
if (lowerType == "peaking")
|
|
114
|
-
return BiquadFilterType::PEAKING;
|
|
115
|
-
if (lowerType == "notch")
|
|
116
|
-
return BiquadFilterType::NOTCH;
|
|
117
|
-
if (lowerType == "allpass")
|
|
118
|
-
return BiquadFilterType::ALLPASS;
|
|
119
|
-
|
|
120
|
-
throw std::invalid_argument("Invalid filter type: " + type);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
static std::string toString(BiquadFilterType type) {
|
|
124
|
-
switch (type) {
|
|
125
|
-
case BiquadFilterType::LOWPASS:
|
|
126
|
-
return "lowpass";
|
|
127
|
-
case BiquadFilterType::HIGHPASS:
|
|
128
|
-
return "highpass";
|
|
129
|
-
case BiquadFilterType::BANDPASS:
|
|
130
|
-
return "bandpass";
|
|
131
|
-
case BiquadFilterType::LOWSHELF:
|
|
132
|
-
return "lowshelf";
|
|
133
|
-
case BiquadFilterType::HIGHSHELF:
|
|
134
|
-
return "highshelf";
|
|
135
|
-
case BiquadFilterType::PEAKING:
|
|
136
|
-
return "peaking";
|
|
137
|
-
case BiquadFilterType::NOTCH:
|
|
138
|
-
return "notch";
|
|
139
|
-
case BiquadFilterType::ALLPASS:
|
|
140
|
-
return "allpass";
|
|
141
|
-
default:
|
|
142
|
-
throw std::invalid_argument("Unknown filter type");
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
99
|
void setNormalizedCoefficients(float b0, float b1, float b2, float a0, float a1, float a2);
|
|
147
100
|
void setLowpassCoefficients(float frequency, float Q);
|
|
148
101
|
void setHighpassCoefficients(float frequency, float Q);
|
|
@@ -24,16 +24,16 @@ WaveShaperNode::WaveShaperNode(std::shared_ptr<BaseAudioContext> context, const
|
|
|
24
24
|
isInitialized_ = true;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return
|
|
27
|
+
OverSampleType WaveShaperNode::getOversample() const {
|
|
28
|
+
return oversample_.load(std::memory_order_acquire);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
void WaveShaperNode::setOversample(
|
|
31
|
+
void WaveShaperNode::setOversample(OverSampleType type) {
|
|
32
32
|
std::scoped_lock<std::mutex> lock(mutex_);
|
|
33
|
-
oversample_.store(
|
|
33
|
+
oversample_.store(type, std::memory_order_release);
|
|
34
34
|
|
|
35
35
|
for (int i = 0; i < waveShapers_.size(); i++) {
|
|
36
|
-
waveShapers_[i]->setOversample(
|
|
36
|
+
waveShapers_[i]->setOversample(type);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -24,10 +24,10 @@ class WaveShaperNode : public AudioNode {
|
|
|
24
24
|
std::shared_ptr<BaseAudioContext> context,
|
|
25
25
|
const WaveShaperOptions &options);
|
|
26
26
|
|
|
27
|
-
[[nodiscard]]
|
|
27
|
+
[[nodiscard]] OverSampleType getOversample() const;
|
|
28
28
|
[[nodiscard]] std::shared_ptr<AudioArray> getCurve() const;
|
|
29
29
|
|
|
30
|
-
void setOversample(
|
|
30
|
+
void setOversample(OverSampleType);
|
|
31
31
|
void setCurve(const std::shared_ptr<AudioArray> &curve);
|
|
32
32
|
|
|
33
33
|
protected:
|
|
@@ -41,29 +41,6 @@ class WaveShaperNode : public AudioNode {
|
|
|
41
41
|
mutable std::mutex mutex_;
|
|
42
42
|
|
|
43
43
|
std::vector<std::unique_ptr<WaveShaper>> waveShapers_{};
|
|
44
|
-
|
|
45
|
-
static OverSampleType overSampleTypeFromString(const std::string &type) {
|
|
46
|
-
std::string lowerType = type;
|
|
47
|
-
std::transform(lowerType.begin(), lowerType.end(), lowerType.begin(), ::tolower);
|
|
48
|
-
|
|
49
|
-
if (lowerType == "2x")
|
|
50
|
-
return OverSampleType::OVERSAMPLE_2X;
|
|
51
|
-
if (lowerType == "4x")
|
|
52
|
-
return OverSampleType::OVERSAMPLE_4X;
|
|
53
|
-
|
|
54
|
-
return OverSampleType::OVERSAMPLE_NONE;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
static std::string overSampleTypeToString(OverSampleType type) {
|
|
58
|
-
switch (type) {
|
|
59
|
-
case OverSampleType::OVERSAMPLE_2X:
|
|
60
|
-
return "2x";
|
|
61
|
-
case OverSampleType::OVERSAMPLE_4X:
|
|
62
|
-
return "4x";
|
|
63
|
-
default:
|
|
64
|
-
return "none";
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
44
|
};
|
|
68
45
|
|
|
69
46
|
} // namespace audioapi
|