@fluex/fluexgl-dsp 0.1.3 → 0.2.2

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.
Files changed (109) hide show
  1. package/README.md +86 -86
  2. package/lib/dist/console-codes.d.ts +13 -13
  3. package/lib/dist/console-codes.js +16 -16
  4. package/lib/dist/core/classes/AudioClip.d.ts +67 -62
  5. package/lib/dist/core/classes/AudioClip.d.ts.map +1 -1
  6. package/lib/dist/core/classes/AudioClip.js +406 -386
  7. package/lib/dist/core/classes/AudioDevice.d.ts +12 -12
  8. package/lib/dist/core/classes/AudioDevice.js +30 -30
  9. package/lib/dist/core/classes/Channel.d.ts +41 -29
  10. package/lib/dist/core/classes/Channel.d.ts.map +1 -1
  11. package/lib/dist/core/classes/Channel.js +210 -144
  12. package/lib/dist/core/classes/DpsPipeline.d.ts +59 -59
  13. package/lib/dist/core/classes/DpsPipeline.js +115 -115
  14. package/lib/dist/core/classes/Effector.d.ts +8 -11
  15. package/lib/dist/core/classes/Effector.d.ts.map +1 -1
  16. package/lib/dist/core/classes/Effector.js +8 -20
  17. package/lib/dist/core/classes/Master.d.ts +11 -11
  18. package/lib/dist/core/classes/Master.js +35 -35
  19. package/lib/dist/core/exports.d.ts +6 -6
  20. package/lib/dist/core/exports.js +6 -6
  21. package/lib/dist/effects/classes/Chorus.d.ts +19 -2
  22. package/lib/dist/effects/classes/Chorus.d.ts.map +1 -1
  23. package/lib/dist/effects/classes/Chorus.js +53 -2
  24. package/lib/dist/effects/classes/Distortion.d.ts +6 -2
  25. package/lib/dist/effects/classes/Distortion.d.ts.map +1 -1
  26. package/lib/dist/effects/classes/Distortion.js +9 -2
  27. package/lib/dist/effects/classes/Equalizer.d.ts +2 -2
  28. package/lib/dist/effects/classes/Equalizer.js +2 -2
  29. package/lib/dist/effects/classes/Limiter.d.ts +2 -2
  30. package/lib/dist/effects/classes/Limiter.js +2 -2
  31. package/lib/dist/effects/classes/Saturation.d.ts +2 -2
  32. package/lib/dist/effects/classes/Saturation.d.ts.map +1 -1
  33. package/lib/dist/effects/classes/Saturation.js +2 -2
  34. package/lib/dist/effects/classes/SoftClip.d.ts +12 -7
  35. package/lib/dist/effects/classes/SoftClip.d.ts.map +1 -1
  36. package/lib/dist/effects/classes/SoftClip.js +54 -38
  37. package/lib/dist/effects/classes/StereoPanner.d.ts +3 -2
  38. package/lib/dist/effects/classes/StereoPanner.d.ts.map +1 -1
  39. package/lib/dist/effects/classes/StereoPanner.js +3 -2
  40. package/lib/dist/effects/classes/compressors/Compressor.d.ts +2 -2
  41. package/lib/dist/effects/classes/compressors/Compressor.js +2 -2
  42. package/lib/dist/effects/classes/compressors/MultibandCompressor.d.ts +2 -2
  43. package/lib/dist/effects/classes/compressors/MultibandCompressor.js +2 -2
  44. package/lib/dist/effects/classes/delays/AdvancedDelay.d.ts +2 -2
  45. package/lib/dist/effects/classes/delays/AdvancedDelay.js +2 -2
  46. package/lib/dist/effects/classes/delays/MonoDelay.d.ts +2 -2
  47. package/lib/dist/effects/classes/delays/MonoDelay.js +2 -2
  48. package/lib/dist/effects/classes/delays/PingPongDelay.d.ts +2 -2
  49. package/lib/dist/effects/classes/delays/PingPongDelay.js +2 -2
  50. package/lib/dist/effects/classes/delays/StereoDelay.d.ts +2 -2
  51. package/lib/dist/effects/classes/delays/StereoDelay.js +2 -2
  52. package/lib/dist/effects/classes/filters/LowPassFilter.d.ts +14 -0
  53. package/lib/dist/effects/classes/filters/LowPassFilter.d.ts.map +1 -0
  54. package/lib/dist/effects/classes/filters/LowPassFilter.js +38 -0
  55. package/lib/dist/effects/classes/reverbs/ChamberReverb.d.ts +2 -2
  56. package/lib/dist/effects/classes/reverbs/ChamberReverb.js +2 -2
  57. package/lib/dist/effects/classes/reverbs/ConvolverReverb.d.ts +2 -2
  58. package/lib/dist/effects/classes/reverbs/ConvolverReverb.js +2 -2
  59. package/lib/dist/effects/classes/reverbs/GenericReverb.d.ts +2 -2
  60. package/lib/dist/effects/classes/reverbs/GenericReverb.js +2 -2
  61. package/lib/dist/effects/classes/reverbs/HallReverb.d.ts +2 -2
  62. package/lib/dist/effects/classes/reverbs/HallReverb.js +2 -2
  63. package/lib/dist/effects/classes/reverbs/RoomReverb.d.ts +2 -2
  64. package/lib/dist/effects/classes/reverbs/RoomReverb.js +2 -2
  65. package/lib/dist/effects/exports.d.ts +19 -19
  66. package/lib/dist/effects/exports.d.ts.map +1 -1
  67. package/lib/dist/effects/exports.js +19 -19
  68. package/lib/dist/index.d.ts +12 -12
  69. package/lib/dist/index.d.ts.map +1 -1
  70. package/lib/dist/index.js +28 -28
  71. package/lib/dist/typings.d.ts +97 -59
  72. package/lib/dist/typings.d.ts.map +1 -1
  73. package/lib/dist/typings.js +30 -1
  74. package/lib/dist/utilities/constants.d.ts +1 -1
  75. package/lib/dist/utilities/constants.js +9 -9
  76. package/lib/dist/utilities/debugger.d.ts +7 -7
  77. package/lib/dist/utilities/debugger.js +49 -49
  78. package/lib/dist/utilities/helpers.d.ts +46 -40
  79. package/lib/dist/utilities/helpers.d.ts.map +1 -1
  80. package/lib/dist/utilities/helpers.js +186 -143
  81. package/lib/dist/utilities/web-assembly.d.ts +3 -3
  82. package/lib/dist/utilities/web-assembly.d.ts.map +1 -1
  83. package/lib/dist/utilities/web-assembly.js +12 -12
  84. package/lib/src/console-codes.ts +15 -15
  85. package/lib/src/core/classes/AudioClip.ts +539 -539
  86. package/lib/src/core/classes/AudioDevice.ts +38 -38
  87. package/lib/src/core/classes/Channel.ts +288 -288
  88. package/lib/src/core/classes/DpsPipeline.ts +152 -152
  89. package/lib/src/core/classes/Effector.ts +11 -12
  90. package/lib/src/core/classes/Master.ts +49 -49
  91. package/lib/src/core/exports.ts +5 -5
  92. package/lib/src/effects/classes/Chorus.ts +65 -111
  93. package/lib/src/effects/classes/Distortion.ts +13 -13
  94. package/lib/src/effects/classes/Saturation.ts +2 -2
  95. package/lib/src/effects/classes/SoftClip.ts +60 -44
  96. package/lib/src/effects/classes/StereoPanner.ts +2 -2
  97. package/lib/src/effects/classes/filters/LowPassFilter.ts +54 -0
  98. package/lib/src/effects/exports.ts +23 -22
  99. package/lib/src/index.ts +98 -93
  100. package/lib/src/typings.ts +113 -78
  101. package/lib/src/utilities/constants.ts +8 -8
  102. package/lib/src/utilities/debugger.ts +65 -65
  103. package/lib/src/utilities/helpers.ts +265 -237
  104. package/lib/src/utilities/web-assembly.ts +12 -12
  105. package/package.json +51 -50
  106. package/lib/dist/effects/classes/Filter.d.ts +0 -3
  107. package/lib/dist/effects/classes/Filter.d.ts.map +0 -1
  108. package/lib/dist/effects/classes/Filter.js +0 -2
  109. package/lib/src/effects/classes/Filter.ts +0 -1
@@ -1,60 +1,98 @@
1
- export declare type ChannelSpatialization = "mono" | "stereo" | "surround";
2
- export declare type AudioClipAnalyserType = "pre" | "post";
3
- export declare type AudioClipAnalyserProperty = "fftSize" | "minDecibels" | "maxDecibels" | "smoothingTimeConstant";
4
- export declare type AudioClipEvents = {
5
- [K in keyof AudioClipEventMap]: AudioClipEventMap[K][];
6
- };
7
- export interface FluexGLAudioDebuggerOptions {
8
- breakOnError: boolean;
9
- showInfo: boolean;
10
- showErrors: boolean;
11
- showWarnings: boolean;
12
- }
13
- export interface FluexGLAudioOptions {
14
- maxMasterChannels: number;
15
- maxTotalChannels: number;
16
- sampleRate: number;
17
- spatialization: ChannelSpatialization;
18
- debugger: FluexGLAudioDebuggerOptions;
19
- }
20
- export interface FluexGLAudioDescriptor {
21
- name: string;
22
- author: string;
23
- version: string;
24
- license: string;
25
- repository: string;
26
- options: FluexGLAudioOptions;
27
- }
28
- export interface LoadAudioSourceOptions {
29
- allowForeignFileTypes: boolean;
30
- }
31
- export interface AudioSourceData {
32
- arrayBuffer: ArrayBuffer;
33
- audioBuffer: AudioBuffer;
34
- id: string;
35
- timestamp: number;
36
- }
37
- export interface ChannelOptions {
38
- label: string | null;
39
- maxAudioNodes: number;
40
- maxEffects: number;
41
- }
42
- export interface AudioClipOnProgressEvent {
43
- startTime: number;
44
- offset: number;
45
- current: number;
46
- contextTimestamp: number;
47
- formatted: string;
48
- }
49
- export interface AudioClipEventMap {
50
- "progress": (event: AudioClipOnProgressEvent) => void;
51
- }
52
- export interface DspPipelineInitializationOptions {
53
- pathToWasm: string;
54
- pathToWorklet: string;
55
- }
56
- export interface DspPipelineInitializationState {
57
- success: boolean;
58
- workletBlobUrl: string;
59
- }
1
+ export type ChannelSpatialization = "mono" | "stereo" | "surround";
2
+ export type AudioClipAnalyserType = "pre" | "post";
3
+ export type AudioClipAnalyserProperty = "fftSize" | "minDecibels" | "maxDecibels" | "smoothingTimeConstant";
4
+ export type AudioClipEvents = {
5
+ [K in keyof AudioClipEventMap]: AudioClipEventMap[K][];
6
+ };
7
+ export declare enum LowPassFilterMessageCommandId {
8
+ SetCutoff = 0,
9
+ SetMinFrequency = 1
10
+ }
11
+ export declare enum ChorusMessageCommandId {
12
+ SetBaseDelayMs = 0,
13
+ SetDepthMs = 1,
14
+ SetRateHz = 2,
15
+ SetMix = 3,
16
+ SetFeedback = 4
17
+ }
18
+ export declare enum AudioWorkletProcessorNames {
19
+ Compressor = "CompressorProcessor",
20
+ MultibandCompressor = "MultibandCompressorProcessor",
21
+ AdvancedDelay = "AdvancedDelayProcessor",
22
+ MonoDelay = "MonoDelayProcessor",
23
+ PingPongDelay = "PingPongDelayProcessor",
24
+ StereoDelay = "StereoDelayProcessor",
25
+ LowPassFilter = "LowPassFilterProcessor",
26
+ HighPassFilter = "HighPassFilterProcessor",
27
+ BandPassFilter = "BandPassFilterProcessor",
28
+ NotchFilter = "NotchFilterProcessor",
29
+ Chorus = "ChorusProcessor",
30
+ Flanger = "FlangerProcessor",
31
+ Phaser = "PhaserProcessor",
32
+ Reverb = "ReverbProcessor"
33
+ }
34
+ export interface FluexGLAudioDebuggerOptions {
35
+ breakOnError: boolean;
36
+ showInfo: boolean;
37
+ showErrors: boolean;
38
+ showWarnings: boolean;
39
+ }
40
+ export interface FluexGLAudioOptions {
41
+ maxMasterChannels: number;
42
+ maxTotalChannels: number;
43
+ sampleRate: number;
44
+ spatialization: ChannelSpatialization;
45
+ debugger: FluexGLAudioDebuggerOptions;
46
+ }
47
+ export interface FluexGLAudioDescriptor {
48
+ name: string;
49
+ author: string;
50
+ version: string;
51
+ license: string;
52
+ repository: string;
53
+ options: FluexGLAudioOptions;
54
+ }
55
+ export interface LoadAudioSourceOptions {
56
+ allowForeignFileTypes: boolean;
57
+ }
58
+ export interface AudioSourceData {
59
+ arrayBuffer: ArrayBuffer;
60
+ audioBuffer: AudioBuffer;
61
+ id: string;
62
+ timestamp: number;
63
+ }
64
+ export interface ChannelOptions {
65
+ label: string | null;
66
+ maxAudioNodes: number;
67
+ maxEffects: number;
68
+ }
69
+ export interface AudioClipOnProgressEvent {
70
+ startTime: number;
71
+ offset: number;
72
+ current: number;
73
+ contextTimestamp: number;
74
+ formatted: string;
75
+ }
76
+ export interface AudioClipEventMap {
77
+ "progress": (event: AudioClipOnProgressEvent) => void;
78
+ }
79
+ export interface DspPipelineInitializationOptions {
80
+ pathToWasm: string;
81
+ pathToWorklet: string;
82
+ }
83
+ export interface DspPipelineInitializationState {
84
+ success: boolean;
85
+ workletBlobUrl: string;
86
+ }
87
+ export interface ChorusEffectOptions {
88
+ baseDelayMs: number;
89
+ depthMs: number;
90
+ rateHz: number;
91
+ mix: number;
92
+ feedback: number;
93
+ }
94
+ export interface LowPassFilterOptions {
95
+ cutoff?: number;
96
+ minFrequency?: number;
97
+ }
60
98
  //# sourceMappingURL=typings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../src/typings.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnE,oBAAY,qBAAqB,GAAG,KAAK,GAAG,MAAM,CAAC;AACnD,oBAAY,yBAAyB,GAAG,SAAS,GAAG,aAAa,GAAG,aAAa,GAAG,uBAAuB,CAAC;AAE5G,oB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,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -1 +1,30 @@
1
- export {};
1
+ export var LowPassFilterMessageCommandId;
2
+ (function (LowPassFilterMessageCommandId) {
3
+ LowPassFilterMessageCommandId[LowPassFilterMessageCommandId["SetCutoff"] = 0] = "SetCutoff";
4
+ LowPassFilterMessageCommandId[LowPassFilterMessageCommandId["SetMinFrequency"] = 1] = "SetMinFrequency";
5
+ })(LowPassFilterMessageCommandId || (LowPassFilterMessageCommandId = {}));
6
+ export var ChorusMessageCommandId;
7
+ (function (ChorusMessageCommandId) {
8
+ ChorusMessageCommandId[ChorusMessageCommandId["SetBaseDelayMs"] = 0] = "SetBaseDelayMs";
9
+ ChorusMessageCommandId[ChorusMessageCommandId["SetDepthMs"] = 1] = "SetDepthMs";
10
+ ChorusMessageCommandId[ChorusMessageCommandId["SetRateHz"] = 2] = "SetRateHz";
11
+ ChorusMessageCommandId[ChorusMessageCommandId["SetMix"] = 3] = "SetMix";
12
+ ChorusMessageCommandId[ChorusMessageCommandId["SetFeedback"] = 4] = "SetFeedback";
13
+ })(ChorusMessageCommandId || (ChorusMessageCommandId = {}));
14
+ export var AudioWorkletProcessorNames;
15
+ (function (AudioWorkletProcessorNames) {
16
+ AudioWorkletProcessorNames["Compressor"] = "CompressorProcessor";
17
+ AudioWorkletProcessorNames["MultibandCompressor"] = "MultibandCompressorProcessor";
18
+ AudioWorkletProcessorNames["AdvancedDelay"] = "AdvancedDelayProcessor";
19
+ AudioWorkletProcessorNames["MonoDelay"] = "MonoDelayProcessor";
20
+ AudioWorkletProcessorNames["PingPongDelay"] = "PingPongDelayProcessor";
21
+ AudioWorkletProcessorNames["StereoDelay"] = "StereoDelayProcessor";
22
+ AudioWorkletProcessorNames["LowPassFilter"] = "LowPassFilterProcessor";
23
+ AudioWorkletProcessorNames["HighPassFilter"] = "HighPassFilterProcessor";
24
+ AudioWorkletProcessorNames["BandPassFilter"] = "BandPassFilterProcessor";
25
+ AudioWorkletProcessorNames["NotchFilter"] = "NotchFilterProcessor";
26
+ AudioWorkletProcessorNames["Chorus"] = "ChorusProcessor";
27
+ AudioWorkletProcessorNames["Flanger"] = "FlangerProcessor";
28
+ AudioWorkletProcessorNames["Phaser"] = "PhaserProcessor";
29
+ AudioWorkletProcessorNames["Reverb"] = "ReverbProcessor";
30
+ })(AudioWorkletProcessorNames || (AudioWorkletProcessorNames = {}));
@@ -1,2 +1,2 @@
1
- export declare const SUPPORTED_FILE_TYPES: string[];
1
+ export declare const SUPPORTED_FILE_TYPES: string[];
2
2
  //# sourceMappingURL=constants.d.ts.map
@@ -1,9 +1,9 @@
1
- export const SUPPORTED_FILE_TYPES = [
2
- "audio/aac",
3
- "audio/mp3",
4
- "audio/mpeg",
5
- "audio/ogg",
6
- "audio/wav",
7
- "audio/wave",
8
- "audio/webm"
9
- ];
1
+ export const SUPPORTED_FILE_TYPES = [
2
+ "audio/aac",
3
+ "audio/mp3",
4
+ "audio/mpeg",
5
+ "audio/ogg",
6
+ "audio/wav",
7
+ "audio/wave",
8
+ "audio/webm"
9
+ ];
@@ -1,8 +1,8 @@
1
- import { ErrorCodes, WarningCodes } from "../console-codes";
2
- export declare namespace Debug {
3
- function Log(message: string, additionalDetails?: string[]): void;
4
- function Success(message: string, additionalDetails?: string[]): void;
5
- function Warn(message: string, additionalDetails?: string[], warningCode?: WarningCodes): void;
6
- function Error(message: string, additionalDetails?: string[], errorCode?: ErrorCodes): void;
7
- }
1
+ import { ErrorCodes, WarningCodes } from "../console-codes";
2
+ export declare namespace Debug {
3
+ function Log(message: string, additionalDetails?: string[]): void;
4
+ function Success(message: string, additionalDetails?: string[]): void;
5
+ function Warn(message: string, additionalDetails?: string[], warningCode?: WarningCodes): void;
6
+ function Error(message: string, additionalDetails?: string[], errorCode?: ErrorCodes): void;
7
+ }
8
8
  //# sourceMappingURL=debugger.d.ts.map
@@ -1,49 +1,49 @@
1
- import { FluexGLAudio } from "../index";
2
- export var Debug;
3
- (function (Debug) {
4
- function Log(message, additionalDetails) {
5
- if (!FluexGLAudio.options.debugger.showInfo)
6
- return;
7
- let outputString = `%c[INFO]: %c${message} %c`;
8
- additionalDetails && additionalDetails.forEach(function (detail) {
9
- outputString += `\n\u0009 > ${detail}`;
10
- });
11
- return console.log(outputString, "color: white;", "color: gray", "color: gray");
12
- }
13
- Debug.Log = Log;
14
- function Success(message, additionalDetails) {
15
- if (!FluexGLAudio.options.debugger.showInfo)
16
- return;
17
- let outputString = `%c[SUCCESS]: %c${message} %c`;
18
- additionalDetails && additionalDetails.forEach(function (detail) {
19
- outputString += `\n\u0009 > ${detail}`;
20
- });
21
- return console.log(outputString, "color: lime;", "color: white", "color: gray");
22
- }
23
- Debug.Success = Success;
24
- function Warn(message, additionalDetails, warningCode) {
25
- if (!FluexGLAudio.options.debugger.showWarnings)
26
- return;
27
- let outputString = `%c(${warningCode ? warningCode : "Unknown".toUpperCase()}) %c[WARNING]: %c${message} %c`;
28
- (additionalDetails && additionalDetails !== null) && additionalDetails.forEach(function (detail) {
29
- outputString += `\n\u0009 > ${detail}`;
30
- });
31
- return console.log(outputString, "color: gray", "color: yellow;", "color: white", "color: white; font-style: italic;");
32
- }
33
- Debug.Warn = Warn;
34
- function Error(message, additionalDetails, errorCode) {
35
- if (!FluexGLAudio.options.debugger.showErrors)
36
- return;
37
- let outputString = `%c(${errorCode ? errorCode : "Unknown".toUpperCase()}) %c[ERROR]: %c${message} %c`;
38
- (additionalDetails && additionalDetails !== null) && additionalDetails.forEach(function (detail) {
39
- outputString += `\n\u0009 > ${detail}`;
40
- });
41
- console.log(outputString, "color: red", "color: red;", "color: white", "color: white; font-style: italic;");
42
- if (FluexGLAudio.options.debugger.breakOnError) {
43
- for (let char of message)
44
- outputString = outputString.replace("%c", "");
45
- throw new window.Error(outputString);
46
- }
47
- }
48
- Debug.Error = Error;
49
- })(Debug || (Debug = {}));
1
+ import { FluexGLAudio } from "../index";
2
+ export var Debug;
3
+ (function (Debug) {
4
+ function Log(message, additionalDetails) {
5
+ if (!FluexGLAudio.options.debugger.showInfo)
6
+ return;
7
+ let outputString = `%c[INFO]: %c${message} %c`;
8
+ additionalDetails && additionalDetails.forEach(function (detail) {
9
+ outputString += `\n\u0009 > ${detail}`;
10
+ });
11
+ return console.log(outputString, "color: white;", "color: gray", "color: gray");
12
+ }
13
+ Debug.Log = Log;
14
+ function Success(message, additionalDetails) {
15
+ if (!FluexGLAudio.options.debugger.showInfo)
16
+ return;
17
+ let outputString = `%c[SUCCESS]: %c${message} %c`;
18
+ additionalDetails && additionalDetails.forEach(function (detail) {
19
+ outputString += `\n\u0009 > ${detail}`;
20
+ });
21
+ return console.log(outputString, "color: lime;", "color: white", "color: gray");
22
+ }
23
+ Debug.Success = Success;
24
+ function Warn(message, additionalDetails, warningCode) {
25
+ if (!FluexGLAudio.options.debugger.showWarnings)
26
+ return;
27
+ let outputString = `%c(${warningCode ? warningCode : "Unknown".toUpperCase()}) %c[WARNING]: %c${message} %c`;
28
+ (additionalDetails && additionalDetails !== null) && additionalDetails.forEach(function (detail) {
29
+ outputString += `\n\u0009 > ${detail}`;
30
+ });
31
+ return console.log(outputString, "color: gray", "color: yellow;", "color: white", "color: white; font-style: italic;");
32
+ }
33
+ Debug.Warn = Warn;
34
+ function Error(message, additionalDetails, errorCode) {
35
+ if (!FluexGLAudio.options.debugger.showErrors)
36
+ return;
37
+ let outputString = `%c(${errorCode ? errorCode : "Unknown".toUpperCase()}) %c[ERROR]: %c${message} %c`;
38
+ (additionalDetails && additionalDetails !== null) && additionalDetails.forEach(function (detail) {
39
+ outputString += `\n\u0009 > ${detail}`;
40
+ });
41
+ console.log(outputString, "color: red", "color: red;", "color: white", "color: white; font-style: italic;");
42
+ if (FluexGLAudio.options.debugger.breakOnError) {
43
+ for (let char of message)
44
+ outputString = outputString.replace("%c", "");
45
+ throw new window.Error(outputString);
46
+ }
47
+ }
48
+ Debug.Error = Error;
49
+ })(Debug || (Debug = {}));
@@ -1,41 +1,47 @@
1
- import { AudioDevice } from "../core/classes/AudioDevice";
2
- import { Master } from "../core/classes/Master";
3
- import { LoadAudioSourceOptions, AudioSourceData, DspPipelineInitializationOptions, DspPipelineInitializationState } from "../typings";
4
- /**
5
- * Initializes the DSP pipeline by requesting audio permissions and initializing the WASM module.
6
- * Very important to call this function and wait for it to complete before using any audio features.
7
- *
8
- * FluexGL DSP cannot be used without calling this function first.
9
- * @returns
10
- */
11
- export declare function InitializeDspPipeline(options: DspPipelineInitializationOptions): Promise<DspPipelineInitializationState | null>;
12
- /**
13
- * Resolves a list of available audio output devices.
14
- * @returns
15
- */
16
- export declare function ResolveAudioOutputDevices(): Promise<AudioDevice[]>;
17
- /**
18
- * Resolves a list of available audio input devices.
19
- * @returns
20
- */
21
- export declare function ResolveAudioInputDevices(): Promise<AudioDevice[]>;
22
- /**
23
- * Resolves the default audio output device.
24
- * @returns
25
- */
26
- export declare function ResolveDefaultAudioOutputDevice(init: DspPipelineInitializationState): Promise<AudioDevice | null>;
27
- /**
28
- * Resolves the default audio input device.
29
- * @returns
30
- */
31
- export declare function ResolveDefaultAudioInputDevice(): Promise<AudioDevice | null>;
32
- /**
33
- * Loads an audio source from a specified path.
34
- * @param path
35
- * @param options
36
- * @returns
37
- */
38
- export declare function LoadAudioSource(path: string, options?: Partial<LoadAudioSourceOptions>): Promise<AudioSourceData | null>;
39
- export declare function ConstructProcessorWorklet(code: string): string;
40
- export declare function LoadWorkletOnMasterChannel(master: Master, workletBlobUrl: string): Promise<boolean>;
1
+ import { AudioDevice } from "../core/classes/AudioDevice";
2
+ import { Master } from "../core/classes/Master";
3
+ import { LoadAudioSourceOptions, AudioSourceData, DspPipelineInitializationOptions, DspPipelineInitializationState, AudioWorkletProcessorNames } from "../typings";
4
+ /**
5
+ * Initializes the DSP pipeline by requesting audio permissions and initializing the WASM module.
6
+ * Very important to call this function and wait for it to complete before using any audio features.
7
+ *
8
+ * FluexGL DSP cannot be used without calling this function first.
9
+ * @returns
10
+ */
11
+ export declare function InitializeDspPipeline(options: DspPipelineInitializationOptions): Promise<DspPipelineInitializationState | null>;
12
+ /**
13
+ * Resolves a list of available audio output devices.
14
+ * @returns
15
+ */
16
+ export declare function ResolveAudioOutputDevices(): Promise<AudioDevice[]>;
17
+ /**
18
+ * Resolves a list of available audio input devices.
19
+ * @returns
20
+ */
21
+ export declare function ResolveAudioInputDevices(): Promise<AudioDevice[]>;
22
+ /**
23
+ * Resolves the default audio output device.
24
+ * @returns
25
+ */
26
+ export declare function ResolveDefaultAudioOutputDevice(init: DspPipelineInitializationState): Promise<AudioDevice | null>;
27
+ /**
28
+ * Resolves the default audio input device.
29
+ * @returns
30
+ */
31
+ export declare function ResolveDefaultAudioInputDevice(init: DspPipelineInitializationState): Promise<AudioDevice | null>;
32
+ /**
33
+ * Loads an audio source from a specified path.
34
+ * @param path
35
+ * @param options
36
+ * @returns
37
+ */
38
+ export declare function LoadAudioSource(path: string, options?: Partial<LoadAudioSourceOptions>): Promise<AudioSourceData | null>;
39
+ /**
40
+ * Loads an audio file from a blob.
41
+ */
42
+ export declare function LoadAudioSourceFromBlob(blob: Blob): Promise<AudioSourceData | null>;
43
+ export declare function ConstructProcessorWorklet(code: string): string;
44
+ export declare function LoadWorkletOnMasterChannel(master: Master, workletBlobUrl: string): Promise<boolean>;
45
+ export declare function SendMessageToWorklet<T, K = any>(node: AudioWorkletNode | null, commandId: T, data: K): boolean;
46
+ export declare function CreateAudioWorkletNode<T = any>(context: AudioContext, name: AudioWorkletProcessorNames | string, data: T): AudioWorkletNode | null;
41
47
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utilities/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,gCAAgC,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAEvI;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,8BAA8B,GAAG,IAAI,CAAC,CAwCrI;AAED;;;GAGG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAUxE;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAUvE;AAED;;;GAGG;AACH,wBAAsB,+BAA+B,CAAC,IAAI,EAAE,8BAA8B,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAmBvH;AAED;;;GAGG;AACH,wBAAsB,8BAA8B,IAAI,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAalF;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,CAAC,sBAAsB,CAAoC,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAoChK;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO9D;AAED,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,oBAgBtF"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utilities/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,C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