speaker-calibration 2.2.197 → 2.2.199

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 (122) hide show
  1. package/.eslintignore +71 -71
  2. package/.eslintrc.json +40 -40
  3. package/.github/workflows/update-phrases.yml +37 -0
  4. package/.prettierignore +69 -69
  5. package/.prettierrc +14 -14
  6. package/LICENSE +20 -20
  7. package/README.md +133 -133
  8. package/__mocks__/fileMock.js +1 -1
  9. package/__mocks__/styleMock.js +1 -1
  10. package/babel.config.js +3 -3
  11. package/coverage/clover.xml +71 -71
  12. package/coverage/coverage-final.json +224 -224
  13. package/coverage/lcov-report/PythonServerInterface.js.html +265 -265
  14. package/coverage/lcov-report/base.css +354 -354
  15. package/coverage/lcov-report/block-navigation.js +82 -82
  16. package/coverage/lcov-report/index.html +123 -123
  17. package/coverage/lcov-report/prettify.css +101 -101
  18. package/coverage/lcov-report/prettify.js +937 -937
  19. package/coverage/lcov-report/sorter.js +189 -189
  20. package/coverage/lcov-report/src/index.html +121 -121
  21. package/coverage/lcov-report/src/server/PythonServerInterface.js.html +268 -268
  22. package/coverage/lcov-report/src/server/index.html +123 -123
  23. package/coverage/lcov-report/src/tasks/audioCalibrator.js.html +499 -499
  24. package/coverage/lcov-report/src/tasks/audioRecorder.js.html +412 -412
  25. package/coverage/lcov-report/src/tasks/index.html +143 -143
  26. package/coverage/lcov-report/src/tasks/volume/index.html +123 -123
  27. package/coverage/lcov-report/src/tasks/volume/volume.js.html +409 -409
  28. package/coverage/lcov-report/src/utils.js.html +172 -172
  29. package/coverage/lcov.info +91 -91
  30. package/dist/example/NoSleep.min.js +1 -1
  31. package/dist/example/fetch-languages-sheets.js +77 -77
  32. package/dist/example/i18n.js +27366 -26993
  33. package/dist/example/index.html +47 -47
  34. package/dist/example/listener.html +79 -79
  35. package/dist/example/listener.js +149 -149
  36. package/dist/example/server.js +51 -51
  37. package/dist/example/speaker.html +145 -145
  38. package/dist/example/speakerUI.js +273 -273
  39. package/dist/example/styles.css +99 -99
  40. package/dist/main.js +1234 -1223
  41. package/dist/mlsGen.js +6814 -6814
  42. package/dist/mlsGen.wasm +0 -0
  43. package/dist/package-lock.json +1018 -1018
  44. package/dist/package.json +18 -18
  45. package/doc/AudioCalibrator.html +417 -417
  46. package/doc/AudioPeer.html +251 -251
  47. package/doc/AudioRecorder.html +195 -195
  48. package/doc/ImpulseResponse.html +215 -215
  49. package/doc/Listener.html +308 -308
  50. package/doc/MlsGenInterface.html +226 -226
  51. package/doc/MyEventEmitter.html +274 -274
  52. package/doc/PythonServerAPI.html +109 -109
  53. package/doc/Speaker.html +276 -276
  54. package/doc/Takes%20a%20target%20element%20where%20html%20elements%20will%20be%20appended..html +128 -128
  55. package/doc/Takes%20the%20url%20of%20the%20current%20site%0Aand%20a%20target%20element%20where%20html%20elements%20will%20be%20appended..html +138 -138
  56. package/doc/Takes%20the%20url%20of%20the%20current%20site%20and%20a%20target%20element%20where%20html%20elements%20will%20be%20appended..html +137 -137
  57. package/doc/Volume.html +88 -88
  58. package/doc/audioCalibrator.js.html +179 -179
  59. package/doc/audioPeer.js.html +175 -175
  60. package/doc/audioRecorder.js.html +163 -163
  61. package/doc/creates%20a%20new%20AudioRecorder%20instance.%20%0ASets%20up%20the%20audio%20context%20and%20file%20reader..html +114 -114
  62. package/doc/fonts/OpenSans-Bold-webfont.svg +1829 -1829
  63. package/doc/fonts/OpenSans-BoldItalic-webfont.svg +1829 -1829
  64. package/doc/fonts/OpenSans-Italic-webfont.svg +1829 -1829
  65. package/doc/fonts/OpenSans-Light-webfont.svg +1830 -1830
  66. package/doc/fonts/OpenSans-LightItalic-webfont.svg +1834 -1834
  67. package/doc/fonts/OpenSans-Regular-webfont.svg +1830 -1830
  68. package/doc/global.html +308 -308
  69. package/doc/index.html +58 -58
  70. package/doc/listener.js.html +170 -170
  71. package/doc/mlsGen_mlsGenInterface.js.html +117 -117
  72. package/doc/myEventEmitter.js.html +124 -124
  73. package/doc/peer-connection_audioPeer.js.html +188 -188
  74. package/doc/peer-connection_listener.js.html +311 -311
  75. package/doc/peer-connection_speaker.js.html +381 -381
  76. package/doc/scripts/linenumber.js +25 -25
  77. package/doc/scripts/prettify/Apache-License-2.0.txt +202 -202
  78. package/doc/scripts/prettify/lang-css.js +24 -24
  79. package/doc/scripts/prettify/prettify.js +640 -640
  80. package/doc/server_PythonServerAPI.js.html +160 -160
  81. package/doc/speaker.js.html +248 -248
  82. package/doc/styles/jsdoc-default.css +371 -371
  83. package/doc/styles/prettify-jsdoc.css +111 -111
  84. package/doc/styles/prettify-tomorrow.css +163 -163
  85. package/doc/tasks_audioCalibrator.js.html +207 -207
  86. package/doc/tasks_audioRecorder.js.html +190 -190
  87. package/doc/tasks_impulse-response_impulseResponse.js.html +442 -442
  88. package/doc/tasks_impulse-response_mlsGen_mlsGenInterface.js.html +175 -175
  89. package/doc/tasks_volume_volume.js.html +185 -185
  90. package/doc/utils.js.html +105 -105
  91. package/jest.config.js +173 -173
  92. package/makefile +74 -0
  93. package/netlify.toml +26 -26
  94. package/package.json +73 -72
  95. package/src/config/firebase.js +26 -26
  96. package/src/index.html +21 -21
  97. package/src/main.js +23 -23
  98. package/src/myEventEmitter.js +83 -83
  99. package/src/peer-connection/audioPeer.js +178 -178
  100. package/src/peer-connection/listener.js +340 -340
  101. package/src/peer-connection/peerErrors.js +25 -25
  102. package/src/peer-connection/speaker.js +727 -724
  103. package/src/powerCheck.js +99 -0
  104. package/src/server/PythonServerAPI.js +869 -835
  105. package/src/tasks/audioCalibrator.js +335 -336
  106. package/src/tasks/audioRecorder.js +315 -315
  107. package/src/tasks/combination/combination.js +2963 -3018
  108. package/src/tasks/combination/mlsGen/mlsGen.cpp +98 -98
  109. package/src/tasks/combination/mlsGen/mlsGen.hpp +303 -303
  110. package/src/tasks/combination/mlsGen/mlsGenInterface.js +131 -131
  111. package/src/tasks/combination/mlsGen/mlsGenTest.cpp +180 -180
  112. package/src/tasks/impulse-response/impulseResponse.js +610 -610
  113. package/src/tasks/impulse-response/mlsGen/mlsGen.cpp +98 -98
  114. package/src/tasks/impulse-response/mlsGen/mlsGen.hpp +303 -303
  115. package/src/tasks/impulse-response/mlsGen/mlsGenInterface.js +131 -131
  116. package/src/tasks/impulse-response/mlsGen/mlsGenTest.cpp +180 -180
  117. package/src/tasks/volume/volume.cpp +2 -2
  118. package/src/tasks/volume/volume.hpp +22 -22
  119. package/src/tasks/volume/volume.js +279 -279
  120. package/src/utils.js +205 -205
  121. package/webpack.config.js +37 -37
  122. package/.gitignore +0 -81
package/jest.config.js CHANGED
@@ -1,173 +1,173 @@
1
- /*
2
- * For a detailed explanation regarding each configuration property, visit:
3
- * https://jestjs.io/docs/configuration
4
- */
5
-
6
- module.exports = {
7
- // All imported modules in your tests should be mocked automatically
8
- // automock: false,
9
-
10
- // Stop running tests after `n` failures
11
- // bail: 0,
12
-
13
- // The directory where Jest should store its cached dependency information
14
- // cacheDirectory: "/private/var/folders/cs/1rk8dkgn7y5421407xn0z3200000gn/T/jest_dx",
15
-
16
- // Automatically clear mock calls, instances and results before every test
17
- clearMocks: true,
18
-
19
- // Indicates whether the coverage information should be collected while executing the test
20
- collectCoverage: true,
21
-
22
- // An array of glob patterns indicating a set of files for which coverage information should be collected
23
- // collectCoverageFrom: undefined,
24
-
25
- // The directory where Jest should output its coverage files
26
- coverageDirectory: 'coverage',
27
-
28
- // An array of regexp pattern strings used to skip coverage collection
29
- coveragePathIgnorePatterns: ['/node_modules/'],
30
-
31
- // Indicates which provider should be used to instrument code for coverage
32
- coverageProvider: 'v8',
33
-
34
- // A list of reporter names that Jest uses when writing coverage reports
35
- // coverageReporters: [
36
- // "json",
37
- // "text",
38
- // "lcov",
39
- // "clover"
40
- // ],
41
-
42
- // An object that configures minimum threshold enforcement for coverage results
43
- // coverageThreshold: undefined,
44
-
45
- // A path to a custom dependency extractor
46
- // dependencyExtractor: undefined,
47
-
48
- // Make calling deprecated APIs throw helpful error messages
49
- // errorOnDeprecated: false,
50
-
51
- // Force coverage collection from ignored files using an array of glob patterns
52
- // forceCoverageMatch: [],
53
-
54
- // A path to a module which exports an async function that is triggered once before all test suites
55
- // globalSetup: undefined,
56
-
57
- // A path to a module which exports an async function that is triggered once after all test suites
58
- // globalTeardown: undefined,
59
-
60
- // A set of global variables that need to be available in all test environments
61
- // globals: {},
62
-
63
- // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
64
- // maxWorkers: "50%",
65
-
66
- // An array of directory names to be searched recursively up from the requiring module's location
67
- moduleDirectories: ['node_modules'],
68
-
69
- // An array of file extensions your modules use
70
- moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'],
71
-
72
- // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
73
- // moduleNameMapper: {},
74
-
75
- // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
76
- // modulePathIgnorePatterns: [],
77
-
78
- // Activates notifications for test results
79
- // notify: false,
80
-
81
- // An enum that specifies notification mode. Requires { notify: true }
82
- // notifyMode: "failure-change",
83
-
84
- // A preset that is used as a base for Jest's configuration
85
- // preset: undefined,
86
-
87
- // Run tests from one or more projects
88
- // projects: undefined,
89
-
90
- // Use this configuration option to add custom reporters to Jest
91
- // reporters: undefined,
92
-
93
- // Automatically reset mock state before every test
94
- // resetMocks: false,
95
-
96
- // Reset the module registry before running each individual test
97
- // resetModules: false,
98
-
99
- // A path to a custom resolver
100
- // resolver: undefined,
101
-
102
- // Automatically restore mock state and implementation before every test
103
- // restoreMocks: false,
104
-
105
- // The root directory that Jest should scan for tests and modules within
106
- // rootDir: undefined,
107
-
108
- // A list of paths to directories that Jest should use to search for files in
109
- roots: ['<rootDir>'],
110
-
111
- // Allows you to use a custom runner instead of Jest's default test runner
112
- // runner: "jest-runner",
113
-
114
- // The paths to modules that run some code to configure or set up the testing environment before each test
115
- // setupFiles: [],
116
-
117
- // A list of paths to modules that run some code to configure or set up the testing framework before each test
118
- // setupFilesAfterEnv: [],
119
-
120
- // The number of seconds after which a test is considered as slow and reported as such in the results.
121
- // slowTestThreshold: 5,
122
-
123
- // A list of paths to snapshot serializer modules Jest should use for snapshot testing
124
- // snapshotSerializers: [],
125
-
126
- // The test environment that will be used for testing
127
- testEnvironment: 'jsdom',
128
-
129
- // Options that will be passed to the testEnvironment
130
- // testEnvironmentOptions: {},
131
-
132
- // Adds a location field to test results
133
- // testLocationInResults: false,
134
-
135
- // The glob patterns Jest uses to detect test files
136
- testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
137
-
138
- // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
139
- testPathIgnorePatterns: ['/node_modules/'],
140
-
141
- // The regexp pattern or array of patterns that Jest uses to detect test files
142
- // testRegex: [],
143
-
144
- // This option allows the use of a custom results processor
145
- // testResultsProcessor: undefined,
146
-
147
- // This option allows use of a custom test runner
148
- // testRunner: "jest-circus/runner",
149
-
150
- // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
151
- // testURL: "http://localhost",
152
-
153
- // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
154
- // timers: "real",
155
-
156
- // A map from regular expressions to paths to transformers
157
- transform: {'\\.[jt]sx?$': 'babel-jest'},
158
-
159
- // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
160
- transformIgnorePatterns: ['/node_modules/', '\\.pnp\\.[^\\/]+$'],
161
-
162
- // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
163
- // unmockedModulePathPatterns: undefined,
164
-
165
- // Indicates whether each individual test should be reported during the run
166
- // verbose: undefined,
167
-
168
- // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
169
- // watchPathIgnorePatterns: [],
170
-
171
- // Whether to use watchman for file crawling
172
- // watchman: true,
173
- };
1
+ /*
2
+ * For a detailed explanation regarding each configuration property, visit:
3
+ * https://jestjs.io/docs/configuration
4
+ */
5
+
6
+ module.exports = {
7
+ // All imported modules in your tests should be mocked automatically
8
+ // automock: false,
9
+
10
+ // Stop running tests after `n` failures
11
+ // bail: 0,
12
+
13
+ // The directory where Jest should store its cached dependency information
14
+ // cacheDirectory: "/private/var/folders/cs/1rk8dkgn7y5421407xn0z3200000gn/T/jest_dx",
15
+
16
+ // Automatically clear mock calls, instances and results before every test
17
+ clearMocks: true,
18
+
19
+ // Indicates whether the coverage information should be collected while executing the test
20
+ collectCoverage: true,
21
+
22
+ // An array of glob patterns indicating a set of files for which coverage information should be collected
23
+ // collectCoverageFrom: undefined,
24
+
25
+ // The directory where Jest should output its coverage files
26
+ coverageDirectory: 'coverage',
27
+
28
+ // An array of regexp pattern strings used to skip coverage collection
29
+ coveragePathIgnorePatterns: ['/node_modules/'],
30
+
31
+ // Indicates which provider should be used to instrument code for coverage
32
+ coverageProvider: 'v8',
33
+
34
+ // A list of reporter names that Jest uses when writing coverage reports
35
+ // coverageReporters: [
36
+ // "json",
37
+ // "text",
38
+ // "lcov",
39
+ // "clover"
40
+ // ],
41
+
42
+ // An object that configures minimum threshold enforcement for coverage results
43
+ // coverageThreshold: undefined,
44
+
45
+ // A path to a custom dependency extractor
46
+ // dependencyExtractor: undefined,
47
+
48
+ // Make calling deprecated APIs throw helpful error messages
49
+ // errorOnDeprecated: false,
50
+
51
+ // Force coverage collection from ignored files using an array of glob patterns
52
+ // forceCoverageMatch: [],
53
+
54
+ // A path to a module which exports an async function that is triggered once before all test suites
55
+ // globalSetup: undefined,
56
+
57
+ // A path to a module which exports an async function that is triggered once after all test suites
58
+ // globalTeardown: undefined,
59
+
60
+ // A set of global variables that need to be available in all test environments
61
+ // globals: {},
62
+
63
+ // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
64
+ // maxWorkers: "50%",
65
+
66
+ // An array of directory names to be searched recursively up from the requiring module's location
67
+ moduleDirectories: ['node_modules'],
68
+
69
+ // An array of file extensions your modules use
70
+ moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'],
71
+
72
+ // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
73
+ // moduleNameMapper: {},
74
+
75
+ // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
76
+ // modulePathIgnorePatterns: [],
77
+
78
+ // Activates notifications for test results
79
+ // notify: false,
80
+
81
+ // An enum that specifies notification mode. Requires { notify: true }
82
+ // notifyMode: "failure-change",
83
+
84
+ // A preset that is used as a base for Jest's configuration
85
+ // preset: undefined,
86
+
87
+ // Run tests from one or more projects
88
+ // projects: undefined,
89
+
90
+ // Use this configuration option to add custom reporters to Jest
91
+ // reporters: undefined,
92
+
93
+ // Automatically reset mock state before every test
94
+ // resetMocks: false,
95
+
96
+ // Reset the module registry before running each individual test
97
+ // resetModules: false,
98
+
99
+ // A path to a custom resolver
100
+ // resolver: undefined,
101
+
102
+ // Automatically restore mock state and implementation before every test
103
+ // restoreMocks: false,
104
+
105
+ // The root directory that Jest should scan for tests and modules within
106
+ // rootDir: undefined,
107
+
108
+ // A list of paths to directories that Jest should use to search for files in
109
+ roots: ['<rootDir>'],
110
+
111
+ // Allows you to use a custom runner instead of Jest's default test runner
112
+ // runner: "jest-runner",
113
+
114
+ // The paths to modules that run some code to configure or set up the testing environment before each test
115
+ // setupFiles: [],
116
+
117
+ // A list of paths to modules that run some code to configure or set up the testing framework before each test
118
+ // setupFilesAfterEnv: [],
119
+
120
+ // The number of seconds after which a test is considered as slow and reported as such in the results.
121
+ // slowTestThreshold: 5,
122
+
123
+ // A list of paths to snapshot serializer modules Jest should use for snapshot testing
124
+ // snapshotSerializers: [],
125
+
126
+ // The test environment that will be used for testing
127
+ testEnvironment: 'jsdom',
128
+
129
+ // Options that will be passed to the testEnvironment
130
+ // testEnvironmentOptions: {},
131
+
132
+ // Adds a location field to test results
133
+ // testLocationInResults: false,
134
+
135
+ // The glob patterns Jest uses to detect test files
136
+ testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
137
+
138
+ // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
139
+ testPathIgnorePatterns: ['/node_modules/'],
140
+
141
+ // The regexp pattern or array of patterns that Jest uses to detect test files
142
+ // testRegex: [],
143
+
144
+ // This option allows the use of a custom results processor
145
+ // testResultsProcessor: undefined,
146
+
147
+ // This option allows use of a custom test runner
148
+ // testRunner: "jest-circus/runner",
149
+
150
+ // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
151
+ // testURL: "http://localhost",
152
+
153
+ // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
154
+ // timers: "real",
155
+
156
+ // A map from regular expressions to paths to transformers
157
+ transform: {'\\.[jt]sx?$': 'babel-jest'},
158
+
159
+ // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
160
+ transformIgnorePatterns: ['/node_modules/', '\\.pnp\\.[^\\/]+$'],
161
+
162
+ // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
163
+ // unmockedModulePathPatterns: undefined,
164
+
165
+ // Indicates whether each individual test should be reported during the run
166
+ // verbose: undefined,
167
+
168
+ // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
169
+ // watchPathIgnorePatterns: [],
170
+
171
+ // Whether to use watchman for file crawling
172
+ // watchman: true,
173
+ };
package/makefile ADDED
@@ -0,0 +1,74 @@
1
+ ##################################### UTILITIES ######################################
2
+ COM_COLOR = \033[0;34m
3
+ OBJ_COLOR = \033[0;36m
4
+ OK_COLOR = \033[0;32m
5
+ ERROR_COLOR = \033[0;31m
6
+ WARN_COLOR = \033[0;33m
7
+ NO_COLOR = \033[m
8
+
9
+ OK_STRING = "[OK]"
10
+ ERROR_STRING = "[ERROR]"
11
+ WARN_STRING = "[WARNING]"
12
+ COM_STRING = "Compiling..."
13
+
14
+ define run_and_test
15
+ printf "%b" "$(COM_COLOR)$(COM_STRING) $(OBJ_COLOR)$(@F)$(NO_COLOR)\r"; \
16
+ $(1) 2> $@.log; \
17
+ RESULT=$$?; \
18
+ if [ $$RESULT -ne 0 ]; then \
19
+ printf "%-60b%b" "$(COM_COLOR)$(COM_STRING)$(OBJ_COLOR) $@" "$(ERROR_COLOR)$(ERROR_STRING)$(NO_COLOR)\n" ; \
20
+ elif [ -s $@.log ]; then \
21
+ printf "%-60b%b" "$(COM_COLOR)$(COM_STRING)$(OBJ_COLOR) $@" "$(WARN_COLOR)$(WARN_STRING)$(NO_COLOR)\n" ; \
22
+ else \
23
+ printf "%-60b%b" "$(COM_COLOR)$(COM_STRING)$(OBJ_COLOR) $(@F)" "$(OK_COLOR)$(OK_STRING)$(NO_COLOR)\n" ; \
24
+ fi; \
25
+ cat $@.log; \
26
+ rm -f $@.log; \
27
+ exit $$RESULT
28
+ endef
29
+
30
+ ##################################### WASM ########################################
31
+ PROJECT_NAME = mlsGen
32
+
33
+ # directories
34
+ DIST_DIR = ./dist/
35
+ SRC_DIR = $(addprefix ./src/tasks/impulse-response/,$(PROJECT_NAME)/)
36
+
37
+ # WASM files
38
+ SRC_FILE := $(addprefix $(SRC_DIR),$(PROJECT_NAME).cpp) # SRC_DIR + PROJECT_NAME + .cpp
39
+ OBJ_FILE := $(addprefix $(SRC_DIR),$(PROJECT_NAME).o)
40
+ OUTPUT_WASM_JS := $(addprefix $(DIST_DIR),$(PROJECT_NAME).js) # DIST_DIR + PROJECT_NAME + .js
41
+ OUTPUT_WASM := $(addprefix $(DIST_DIR),$(PROJECT_NAME).wasm) # DIST_DIR + PROJECT_NAME + .wasm
42
+ OUTPUT := $(addprefix $(DIST_DIR),$(PROJECT_NAME).*) # DIST_DIR + PROJECT_NAME + .*
43
+
44
+ # emcc compiler options
45
+ EMCC = em++ # emcc compiler front end
46
+ STD = --std=c++17 # C++ standard
47
+ OPTIMIZE = -O3 # Optimization level O0 ~ 28.8 kB, O1 ~ 20.3 kB, O2 ~ 20.3 kB, O3 ~ 19.7 kB
48
+ ENV = -s ENVIRONMENT='web' # environment
49
+ NOENTRY = --no-entry # no entry point (no main function)
50
+ MODULARIZE = -s MODULARIZE=1 -s 'EXPORT_NAME="createMLSGenModule"' # puts all of the generated JavaScript into a factory function
51
+ BIND = -lembind # links against embind library
52
+ MEMORY_CHECKS = -s ASSERTIONS=1 -fsanitize=address -g2
53
+
54
+ # gcc compiler options
55
+ GCC = gcc # gcc compiler front end
56
+
57
+ # KISSFFT Library
58
+ KISS_LIB= /Users/hugo/Desktop/dev/easyeyes/speaker-calibration/src/tasks/impulse-response/kissfft/libkissfft-float.a
59
+ KISS_H= -I /Users/hugo/Desktop/dev/easyeyes/speaker-calibration/src/tasks/impulse-response/kissfft/
60
+
61
+ # build the WASM + JS glue module, linked with embind
62
+ $(PROJECT_NAME)_bind: # $(OBJ_FILE)
63
+ @mkdir -p $(@D)
64
+ @$(call run_and_test, $(EMCC) $(STD) $(BIND) $(SRC_FILE) -o $(OUTPUT_WASM_JS) $(MODULARIZE) $(OPTIMIZE) $(ENV) $(MEMORY_CHECKS) $(KISS_H) $(KISS_LIB))
65
+
66
+ # clean the WASM + JS files
67
+ .PHONY: clean
68
+ clean:
69
+ @mkdir -p $(@D)
70
+ @$(call run_and_test, rm -f $(OUTPUT))
71
+
72
+ .PHONY: rebuild
73
+ rebuild:
74
+ @make clean; make $(PROJECT_NAME)_bind
package/netlify.toml CHANGED
@@ -1,27 +1,27 @@
1
- # Settings in the [build] context are global and are applied to
2
- # all contexts unless otherwise overridden by more specific contexts.
3
- [build]
4
- # Directory to change to before starting a build.
5
- # This is where we will look for package.json/.nvmrc/etc.
6
- # If not set, defaults to the root directory.
7
- base = ""
8
-
9
- # Directory that contains the deploy-ready HTML files and
10
- # assets generated by the build. This is relative to the base
11
- # directory if one has been set, or the root directory if
12
- # a base has not been set.
13
-
14
- publish = "dist/"
15
-
16
- # Default build command.
17
- command = "npm run build:prod"
18
-
19
- # Redirects and headers are GLOBAL for all builds – they do not
20
- # get scoped to contexts no matter where you define them in the file.
21
- # For context-specific rules, use _headers or _redirects files,
22
- # which are PER-DEPLOY.
23
-
24
- # A basic redirect rule
25
- [[redirects]]
26
- from = "/*"
1
+ # Settings in the [build] context are global and are applied to
2
+ # all contexts unless otherwise overridden by more specific contexts.
3
+ [build]
4
+ # Directory to change to before starting a build.
5
+ # This is where we will look for package.json/.nvmrc/etc.
6
+ # If not set, defaults to the root directory.
7
+ base = ""
8
+
9
+ # Directory that contains the deploy-ready HTML files and
10
+ # assets generated by the build. This is relative to the base
11
+ # directory if one has been set, or the root directory if
12
+ # a base has not been set.
13
+
14
+ publish = "dist/"
15
+
16
+ # Default build command.
17
+ command = "npm run build:prod"
18
+
19
+ # Redirects and headers are GLOBAL for all builds – they do not
20
+ # get scoped to contexts no matter where you define them in the file.
21
+ # For context-specific rules, use _headers or _redirects files,
22
+ # which are PER-DEPLOY.
23
+
24
+ # A basic redirect rule
25
+ [[redirects]]
26
+ from = "/*"
27
27
  to = "/example"
package/package.json CHANGED
@@ -1,72 +1,73 @@
1
- {
2
- "name": "speaker-calibration",
3
- "version": "2.2.197",
4
- "description": "Speaker calibration library for auditory testing",
5
- "main": "dist/main.js",
6
- "directories": {
7
- "bin": "dist"
8
- },
9
- "scripts": {
10
- "phrases": "node dist/example/fetch-languages-sheets.js && prettier --write dist/example/i18n.js",
11
- "build:prod": "webpack --mode production --progress",
12
- "build:dev": "webpack --watch --mode development --progress",
13
- "build:dev:analyze": "webpack --watch --mode development --progress --analyze",
14
- "serve:dev": "nodemon ./dist/example/server.js",
15
- "build:wasm": "make rebuild",
16
- "lint": "eslint src --ext .js",
17
- "lint:fix": "npm run lint -- --fix",
18
- "format": "prettier --write \"**/*.{js,json,md,html,css}\"",
19
- "build:doc": "jsdoc src -r -d ./doc",
20
- "test": "jest",
21
- "test:watch": "jest --watchAll --coverage"
22
- },
23
- "keywords": [],
24
- "constributors": [
25
- {
26
- "name": "Hugo De Moraes",
27
- "email": "demoraeshugo@gmail.com",
28
- "url": "https://github.com/demoraeshugo"
29
- }
30
- ],
31
- "license": "MIT",
32
- "repository": "git://github.com/EasyEyes/speaker-calibration.git",
33
- "dependencies": {
34
- "axios": "^1.6.7",
35
- "fftw-js": "^0.1.4",
36
- "firebase": "^9.23.0",
37
- "googleapis": "^140.0.1",
38
- "np": "^7.7.0",
39
- "path-browserify": "^1.0.1",
40
- "peerjs": "^1.3.2",
41
- "qrcode": "^1.4.4",
42
- "socket.io-client": "^4.4.1",
43
- "sweetalert2": "^11.14.0",
44
- "uuid": "^8.3.2",
45
- "xlsx": "^0.18.5"
46
- },
47
- "devDependencies": {
48
- "@babel/core": "^7.17.9",
49
- "@babel/preset-env": "^7.16.11",
50
- "babel-jest": "^27.5.1",
51
- "css-loader": "^5.2.6",
52
- "eslint": "^8.10.0",
53
- "eslint-config-airbnb-base": "^15.0.0",
54
- "eslint-config-prettier": "^8.4.0",
55
- "eslint-plugin-compat": "^4.0.2",
56
- "eslint-plugin-import": "^2.25.4",
57
- "eslint-plugin-jsdoc": "^39.3.4",
58
- "eslint-plugin-no-floating-promise": "^1.0.2",
59
- "express": "^4.17.1",
60
- "jest": "^27.5.1",
61
- "jsdoc": "^4.0.2",
62
- "nodemon": "^2.0.15",
63
- "prettier": "^2.5.1",
64
- "style-loader": "^2.0.0",
65
- "webpack": "^5.90.3",
66
- "webpack-bundle-analyzer": "^4.5.0",
67
- "webpack-cli": "^4.9.2"
68
- },
69
- "browserslist": [
70
- "defaults"
71
- ]
72
- }
1
+ {
2
+ "name": "speaker-calibration",
3
+ "version": "2.2.199",
4
+ "description": "Speaker calibration library for auditory testing",
5
+ "main": "dist/main.js",
6
+ "directories": {
7
+ "bin": "dist"
8
+ },
9
+ "scripts": {
10
+ "phrases": "node dist/example/fetch-languages-sheets.js && prettier --write dist/example/i18n.js",
11
+ "build:prod": "webpack --mode production --progress",
12
+ "build:dev": "webpack --watch --mode development --progress",
13
+ "build:dev:analyze": "webpack --watch --mode development --progress --analyze",
14
+ "serve:dev": "nodemon ./dist/example/server.js",
15
+ "build:wasm": "make rebuild",
16
+ "lint": "eslint src --ext .js",
17
+ "lint:fix": "npm run lint -- --fix",
18
+ "format": "prettier --write \"**/*.{js,json,md,html,css}\"",
19
+ "build:doc": "jsdoc src -r -d ./doc",
20
+ "test": "jest",
21
+ "test:watch": "jest --watchAll --coverage"
22
+ },
23
+ "keywords": [],
24
+ "constributors": [
25
+ {
26
+ "name": "Hugo De Moraes",
27
+ "email": "demoraeshugo@gmail.com",
28
+ "url": "https://github.com/demoraeshugo"
29
+ }
30
+ ],
31
+ "license": "MIT",
32
+ "repository": "git://github.com/EasyEyes/speaker-calibration.git",
33
+ "dependencies": {
34
+ "axios": "^1.6.7",
35
+ "fftw-js": "^0.1.4",
36
+ "firebase": "^9.23.0",
37
+ "googleapis": "^140.0.1",
38
+ "np": "^7.7.0",
39
+ "nvm": "^0.0.4",
40
+ "path-browserify": "^1.0.1",
41
+ "peerjs": "^1.3.2",
42
+ "qrcode": "^1.4.4",
43
+ "socket.io-client": "^4.4.1",
44
+ "sweetalert2": "^11.14.0",
45
+ "uuid": "^8.3.2",
46
+ "xlsx": "^0.18.5"
47
+ },
48
+ "devDependencies": {
49
+ "@babel/core": "^7.17.9",
50
+ "@babel/preset-env": "^7.16.11",
51
+ "babel-jest": "^27.5.1",
52
+ "css-loader": "^5.2.6",
53
+ "eslint": "^8.10.0",
54
+ "eslint-config-airbnb-base": "^15.0.0",
55
+ "eslint-config-prettier": "^8.4.0",
56
+ "eslint-plugin-compat": "^4.0.2",
57
+ "eslint-plugin-import": "^2.25.4",
58
+ "eslint-plugin-jsdoc": "^39.3.4",
59
+ "eslint-plugin-no-floating-promise": "^1.0.2",
60
+ "express": "^4.17.1",
61
+ "jest": "^27.5.1",
62
+ "jsdoc": "^4.0.2",
63
+ "nodemon": "^2.0.15",
64
+ "prettier": "^2.5.1",
65
+ "style-loader": "^2.0.0",
66
+ "webpack": "^5.90.3",
67
+ "webpack-bundle-analyzer": "^4.5.0",
68
+ "webpack-cli": "^4.9.2"
69
+ },
70
+ "browserslist": [
71
+ "defaults"
72
+ ]
73
+ }