@carbonenginejs/runtime-resource 0.1.0 → 0.8.0

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 (329) hide show
  1. package/FORMAT-PROVENANCE.md +155 -135
  2. package/LICENSE +21 -21
  3. package/NOTICE +29 -29
  4. package/README.md +548 -241
  5. package/dist/CjsMotherLode.js +1271 -56
  6. package/dist/CjsMotherLode.js.map +1 -1
  7. package/dist/CjsResMan.js +3005 -740
  8. package/dist/CjsResMan.js.map +1 -1
  9. package/dist/CjsResManQueue.js +214 -214
  10. package/dist/CjsResource.js +566 -366
  11. package/dist/CjsResource.js.map +1 -1
  12. package/dist/CjsResourceSource.js +59 -59
  13. package/dist/_virtual/_rollupPluginBabelHelpers.js +153 -153
  14. package/dist/format/CjsBlueReader.js +269 -0
  15. package/dist/format/CjsBlueReader.js.map +1 -0
  16. package/dist/format/CjsFormat.js +192 -178
  17. package/dist/format/CjsFormat.js.map +1 -1
  18. package/dist/format/CjsReader.js +18 -0
  19. package/dist/format/CjsReader.js.map +1 -0
  20. package/dist/format/CjsResourceProbe.js +277 -269
  21. package/dist/format/CjsResourceProbe.js.map +1 -1
  22. package/dist/format/payloadContract.js +173 -173
  23. package/dist/formats/black/CjsBlackFormat.js +278 -272
  24. package/dist/formats/black/CjsBlackFormat.js.map +1 -1
  25. package/dist/formats/black/core/CjsBlackBinaryReader.js +153 -153
  26. package/dist/formats/black/core/CjsBlackPropertyReaders.js +382 -382
  27. package/dist/formats/black/core/CjsBlackReader.js +639 -760
  28. package/dist/formats/black/core/CjsBlackReader.js.map +1 -1
  29. package/dist/formats/black/core/CjsBlackSchemaRegistry.js +433 -433
  30. package/dist/formats/black/core/black-schema-v1-2026-07-11.json.js +4 -4
  31. package/dist/formats/black/core/blackConstants.js +7 -7
  32. package/dist/formats/black/core/blackDefinitions.js +10 -10
  33. package/dist/formats/black/core/blackEnums.js +6 -6
  34. package/dist/formats/black/core/blackSchema.js +3 -3
  35. package/dist/formats/black/core/blackVersion.js +22 -22
  36. package/dist/formats/black/core/helpers.js +182 -182
  37. package/dist/formats/black/core/schema.js +4 -4
  38. package/dist/formats/black/index.js +2 -2
  39. package/dist/formats/bnk/CjsBnkFormat.js +238 -245
  40. package/dist/formats/bnk/CjsBnkFormat.js.map +1 -1
  41. package/dist/formats/bnk/core/graph.js +140 -0
  42. package/dist/formats/bnk/core/graph.js.map +1 -0
  43. package/dist/formats/bnk/core/helpers.js +409 -354
  44. package/dist/formats/bnk/core/helpers.js.map +1 -1
  45. package/dist/formats/bnk/core/musicNodes.js +521 -0
  46. package/dist/formats/bnk/core/musicNodes.js.map +1 -0
  47. package/dist/formats/bnk/core/soundbanksInfo.js +246 -246
  48. package/dist/formats/bnk/index.js +2 -3
  49. package/dist/formats/bnk/index.js.map +1 -1
  50. package/dist/formats/cmf/CjsCmfFormat.js +497 -491
  51. package/dist/formats/cmf/CjsCmfFormat.js.map +1 -1
  52. package/dist/formats/cmf/core/binary.js +118 -118
  53. package/dist/formats/cmf/core/buffers.js +233 -233
  54. package/dist/formats/cmf/core/constants.js +47 -47
  55. package/dist/formats/cmf/core/gr2Anim.js +453 -453
  56. package/dist/formats/cmf/core/helpers.js +287 -287
  57. package/dist/formats/cmf/core/pack.js +276 -276
  58. package/dist/formats/cmf/core/schema.js +364 -364
  59. package/dist/formats/cmf/core/shared.js +268 -268
  60. package/dist/formats/cmf/core/writer.js +517 -517
  61. package/dist/formats/cmf/index.js +2 -2
  62. package/dist/formats/dds/CjsDdsFormat.js +193 -187
  63. package/dist/formats/dds/CjsDdsFormat.js.map +1 -1
  64. package/dist/formats/dds/core/bc6h.js +288 -0
  65. package/dist/formats/dds/core/bc6h.js.map +1 -0
  66. package/dist/formats/dds/core/bc7.js +251 -0
  67. package/dist/formats/dds/core/bc7.js.map +1 -0
  68. package/dist/formats/dds/core/helpers.js +815 -812
  69. package/dist/formats/dds/core/helpers.js.map +1 -1
  70. package/dist/formats/dds/index.js +2 -2
  71. package/dist/formats/fbx/CjsFbxFormat.js +266 -260
  72. package/dist/formats/fbx/CjsFbxFormat.js.map +1 -1
  73. package/dist/formats/fbx/core/helpers.js +3901 -3901
  74. package/dist/formats/fbx/index.js +2 -2
  75. package/dist/formats/flac/CjsFlacFormat.js +87 -81
  76. package/dist/formats/flac/CjsFlacFormat.js.map +1 -1
  77. package/dist/formats/flac/core/helpers.js +295 -295
  78. package/dist/formats/flac/index.js +2 -2
  79. package/dist/formats/gif/CjsGifFormat.js +87 -81
  80. package/dist/formats/gif/CjsGifFormat.js.map +1 -1
  81. package/dist/formats/gif/core/helpers.js +360 -360
  82. package/dist/formats/gif/index.js +2 -2
  83. package/dist/formats/gltf/CjsGltfFormat.js +290 -284
  84. package/dist/formats/gltf/CjsGltfFormat.js.map +1 -1
  85. package/dist/formats/gltf/core/helpers.js +292 -292
  86. package/dist/formats/gltf/core/json.js +79 -79
  87. package/dist/formats/gltf/core/parser.js +666 -666
  88. package/dist/formats/gltf/core/targets.js +163 -163
  89. package/dist/formats/gltf/index.js +2 -2
  90. package/dist/formats/index.js +23 -23
  91. package/dist/formats/jpeg/CjsJpegFormat.js +206 -200
  92. package/dist/formats/jpeg/CjsJpegFormat.js.map +1 -1
  93. package/dist/formats/jpeg/core/helpers.js +350 -350
  94. package/dist/formats/jpeg/core/jpeg.js +377 -377
  95. package/dist/formats/jpeg/index.js +2 -2
  96. package/dist/formats/mp3/CjsMp3Format.js +192 -186
  97. package/dist/formats/mp3/CjsMp3Format.js.map +1 -1
  98. package/dist/formats/mp3/core/helpers.js +338 -338
  99. package/dist/formats/mp3/index.js +2 -2
  100. package/dist/formats/mp4/CjsMp4Format.js +191 -185
  101. package/dist/formats/mp4/CjsMp4Format.js.map +1 -1
  102. package/dist/formats/mp4/core/helpers.js +449 -449
  103. package/dist/formats/mp4/index.js +2 -2
  104. package/dist/formats/obj/CjsObjFormat.js +253 -247
  105. package/dist/formats/obj/CjsObjFormat.js.map +1 -1
  106. package/dist/formats/obj/core/helpers.js +573 -573
  107. package/dist/formats/obj/core/json.js +64 -64
  108. package/dist/formats/obj/core/parser.js +321 -321
  109. package/dist/formats/obj/index.js +2 -2
  110. package/dist/formats/ogg/CjsOggFormat.js +88 -82
  111. package/dist/formats/ogg/CjsOggFormat.js.map +1 -1
  112. package/dist/formats/ogg/core/helpers.js +387 -387
  113. package/dist/formats/ogg/core/imdct.js +178 -178
  114. package/dist/formats/ogg/core/vorbis.js +999 -999
  115. package/dist/formats/ogg/index.js +2 -2
  116. package/dist/formats/png/CjsPngFormat.js +195 -189
  117. package/dist/formats/png/CjsPngFormat.js.map +1 -1
  118. package/dist/formats/png/core/helpers.js +583 -583
  119. package/dist/formats/png/index.js +2 -2
  120. package/dist/formats/red/CjsRedFormat.js +261 -247
  121. package/dist/formats/red/CjsRedFormat.js.map +1 -1
  122. package/dist/formats/red/core/CjsRedReader.js +194 -201
  123. package/dist/formats/red/core/CjsRedReader.js.map +1 -1
  124. package/dist/formats/red/core/blackDefinitions.js +3 -3
  125. package/dist/formats/red/core/helpers.js +139 -136
  126. package/dist/formats/red/core/helpers.js.map +1 -1
  127. package/dist/formats/red/core/redGraph.js +68 -68
  128. package/dist/formats/red/core/schema.js +4 -4
  129. package/dist/formats/red/index.js +2 -2
  130. package/dist/formats/stl/CjsStlFormat.js +365 -304
  131. package/dist/formats/stl/CjsStlFormat.js.map +1 -1
  132. package/dist/formats/stl/core/helpers.js +261 -257
  133. package/dist/formats/stl/core/helpers.js.map +1 -1
  134. package/dist/formats/stl/core/json.js +51 -51
  135. package/dist/formats/stl/core/stl.js +629 -544
  136. package/dist/formats/stl/core/stl.js.map +1 -1
  137. package/dist/formats/stl/core/targets.js +163 -163
  138. package/dist/formats/stl/index.js +2 -2
  139. package/dist/formats/tga/CjsTgaFormat.js +192 -186
  140. package/dist/formats/tga/CjsTgaFormat.js.map +1 -1
  141. package/dist/formats/tga/core/helpers.js +446 -446
  142. package/dist/formats/tga/index.js +2 -2
  143. package/dist/formats/wav/CjsWavFormat.js +192 -186
  144. package/dist/formats/wav/CjsWavFormat.js.map +1 -1
  145. package/dist/formats/wav/core/helpers.js +328 -328
  146. package/dist/formats/wav/index.js +2 -2
  147. package/dist/formats/webm/CjsWebmFormat.js +191 -185
  148. package/dist/formats/webm/CjsWebmFormat.js.map +1 -1
  149. package/dist/formats/webm/core/helpers.js +537 -537
  150. package/dist/formats/webm/index.js +2 -2
  151. package/dist/formats/webp/CjsWebpFormat.js +86 -80
  152. package/dist/formats/webp/CjsWebpFormat.js.map +1 -1
  153. package/dist/formats/webp/core/helpers.js +214 -214
  154. package/dist/formats/webp/index.js +2 -2
  155. package/dist/formats/wem/CjsWemFormat.js +241 -197
  156. package/dist/formats/wem/CjsWemFormat.js.map +1 -1
  157. package/dist/formats/wem/core/bitStream.js +259 -259
  158. package/dist/formats/wem/core/codebookLibrary.js +164 -164
  159. package/dist/formats/wem/core/helpers.js +417 -336
  160. package/dist/formats/wem/core/helpers.js.map +1 -1
  161. package/dist/formats/wem/core/packedCodebooksAotuv603.js +30 -30
  162. package/dist/formats/wem/core/ptadpcm.js +77 -0
  163. package/dist/formats/wem/core/ptadpcm.js.map +1 -0
  164. package/dist/formats/wem/core/resolve.js +121 -0
  165. package/dist/formats/wem/core/resolve.js.map +1 -0
  166. package/dist/formats/wem/core/wemToOgg.js +485 -485
  167. package/dist/formats/wem/index.js +2 -2
  168. package/dist/formats/yaml/CjsYamlFormat.js +83 -77
  169. package/dist/formats/yaml/CjsYamlFormat.js.map +1 -1
  170. package/dist/formats/yaml/core/CjsYamlReader.js +305 -304
  171. package/dist/formats/yaml/core/CjsYamlReader.js.map +1 -1
  172. package/dist/formats/yaml/core/helpers.js +160 -160
  173. package/dist/formats/yaml/index.js +2 -2
  174. package/dist/index.js +48 -52
  175. package/dist/index.js.map +1 -1
  176. package/dist/resourcePath.js +18 -18
  177. package/dist/resourceStates.js +9 -9
  178. package/dist/{generated/resources → resources}/AudioGeometryResData.js +47 -47
  179. package/dist/resources/AudioGeometryResData.js.map +1 -0
  180. package/dist/{generated/resources → resources}/GStateBindingCallbackData.js +31 -31
  181. package/dist/resources/GStateBindingCallbackData.js.map +1 -0
  182. package/dist/{generated/resources → resources}/MeshDecalData.js +37 -37
  183. package/dist/resources/MeshDecalData.js.map +1 -0
  184. package/dist/{generated/resources → resources}/MeshDecalLodData.js +34 -34
  185. package/dist/resources/MeshDecalLodData.js.map +1 -0
  186. package/dist/resources/Tr2EffectRes.js +71 -71
  187. package/dist/resources/Tr2GrannyIntersectionResult.js +60 -0
  188. package/dist/resources/Tr2GrannyIntersectionResult.js.map +1 -0
  189. package/dist/resources/Tr2GrannyStateRes.js +44 -44
  190. package/dist/resources/Tr2ImageRes.js +114 -114
  191. package/dist/resources/Tr2LightProfileRes.js +40 -40
  192. package/dist/{generated/resources → resources}/Tr2MaterialArea.js +34 -34
  193. package/dist/resources/Tr2MaterialArea.js.map +1 -0
  194. package/dist/{generated/resources → resources}/Tr2MaterialMesh.js +31 -31
  195. package/dist/resources/Tr2MaterialMesh.js.map +1 -0
  196. package/dist/{generated/resources → resources}/Tr2MaterialRes.js +34 -34
  197. package/dist/resources/Tr2MaterialRes.js.map +1 -0
  198. package/dist/{generated/resources → resources}/Tr2ShaderPermutation.js +43 -43
  199. package/dist/resources/Tr2ShaderPermutation.js.map +1 -0
  200. package/dist/{generated/resources → resources}/Tr2TextureLodManager.js +100 -60
  201. package/dist/resources/Tr2TextureLodManager.js.map +1 -0
  202. package/dist/{generated/resources → resources}/Tr2TextureLodUpdateRequest.js +37 -37
  203. package/dist/resources/Tr2TextureLodUpdateRequest.js.map +1 -0
  204. package/dist/{generated/resources → resources}/Tr2TexturePackChannel.js +37 -37
  205. package/dist/resources/Tr2TexturePackChannel.js.map +1 -0
  206. package/dist/resources/Tr2TexturePipeline.js +68 -0
  207. package/dist/resources/Tr2TexturePipeline.js.map +1 -0
  208. package/dist/{generated/resources → resources}/Tr2TexturePipelineParams.js +34 -34
  209. package/dist/resources/Tr2TexturePipelineParams.js.map +1 -0
  210. package/dist/{generated/resources → resources}/Tr2TexturePipelineStepCompress.js +40 -40
  211. package/dist/resources/Tr2TexturePipelineStepCompress.js.map +1 -0
  212. package/dist/{generated/resources → resources}/Tr2TexturePipelineStepLimitSize.js +34 -34
  213. package/dist/resources/Tr2TexturePipelineStepLimitSize.js.map +1 -0
  214. package/dist/{generated/resources → resources}/Tr2TexturePipelineStepLoad.js +31 -31
  215. package/dist/resources/Tr2TexturePipelineStepLoad.js.map +1 -0
  216. package/dist/{generated/resources → resources}/Tr2TexturePipelineStepPack.js +43 -43
  217. package/dist/resources/Tr2TexturePipelineStepPack.js.map +1 -0
  218. package/dist/resources/TriGeometryRes.js +239 -216
  219. package/dist/resources/TriGeometryRes.js.map +1 -1
  220. package/dist/{generated/resources → resources}/TriGeometryResAreaData.js +59 -59
  221. package/dist/resources/TriGeometryResAreaData.js.map +1 -0
  222. package/dist/{generated/resources → resources}/TriGeometryResJointData.js +38 -38
  223. package/dist/resources/TriGeometryResJointData.js.map +1 -0
  224. package/dist/{generated/resources → resources}/TriGeometryResLodData.js +88 -88
  225. package/dist/resources/TriGeometryResLodData.js.map +1 -0
  226. package/dist/{generated/resources → resources}/TriGeometryResMeshData.js +63 -63
  227. package/dist/resources/TriGeometryResMeshData.js.map +1 -0
  228. package/dist/{generated/resources → resources}/TriGeometryResSkeletonData.js +34 -34
  229. package/dist/resources/TriGeometryResSkeletonData.js.map +1 -0
  230. package/dist/resources/TriGrannyRes.js +43 -43
  231. package/dist/{generated/resources → resources}/TriJointBinding.js +38 -38
  232. package/dist/resources/TriJointBinding.js.map +1 -0
  233. package/dist/{generated/resources → resources}/TriMorphTargetGeometryConstants.js +46 -46
  234. package/dist/resources/TriMorphTargetGeometryConstants.js.map +1 -0
  235. package/dist/{generated/resources → resources}/TriRtGeometryConstants.js +88 -88
  236. package/dist/resources/TriRtGeometryConstants.js.map +1 -0
  237. package/dist/resources/TriTextureRes.js +304 -304
  238. package/dist/{generated/resources → resources}/enums.js +18 -18
  239. package/dist/resources/enums.js.map +1 -0
  240. package/dist/resources/resourceBoundary.js +47 -47
  241. package/dist/resources/texturePipelineBehavior.js +320 -0
  242. package/dist/resources/texturePipelineBehavior.js.map +1 -0
  243. package/dist/texture/CjsTextureArrayRes.js +406 -406
  244. package/dist/texture/CjsTextureParameterProxy.js +133 -133
  245. package/format-notices/black/LICENSE +21 -21
  246. package/format-notices/black/NOTICE +47 -47
  247. package/format-notices/bnk/LICENSE +21 -21
  248. package/format-notices/bnk/NOTICE +20 -17
  249. package/format-notices/cmf/LICENSE +21 -21
  250. package/format-notices/cmf/NOTICE +36 -36
  251. package/format-notices/dds/LICENSE +21 -21
  252. package/format-notices/dds/NOTICE +14 -14
  253. package/format-notices/fbx/LICENSE +21 -21
  254. package/format-notices/fbx/NOTICE +14 -14
  255. package/format-notices/flac/LICENSE +21 -21
  256. package/format-notices/flac/NOTICE +14 -14
  257. package/format-notices/gif/LICENSE +21 -21
  258. package/format-notices/gif/NOTICE +14 -14
  259. package/format-notices/gltf/LICENSE +21 -21
  260. package/format-notices/gltf/NOTICE +27 -27
  261. package/format-notices/jpeg/LICENSE +21 -21
  262. package/format-notices/jpeg/NOTICE +14 -14
  263. package/format-notices/mp3/LICENSE +21 -21
  264. package/format-notices/mp3/NOTICE +14 -14
  265. package/format-notices/mp4/LICENSE +21 -21
  266. package/format-notices/mp4/NOTICE +14 -14
  267. package/format-notices/obj/LICENSE +21 -21
  268. package/format-notices/obj/NOTICE +26 -26
  269. package/format-notices/ogg/LICENSE +21 -21
  270. package/format-notices/ogg/NOTICE +28 -28
  271. package/format-notices/png/LICENSE +21 -21
  272. package/format-notices/png/NOTICE +14 -14
  273. package/format-notices/red/LICENSE +21 -21
  274. package/format-notices/red/NOTICE +31 -31
  275. package/format-notices/stl/LICENSE +21 -21
  276. package/format-notices/stl/NOTICE +21 -21
  277. package/format-notices/tga/LICENSE +21 -21
  278. package/format-notices/tga/NOTICE +14 -14
  279. package/format-notices/wav/LICENSE +21 -21
  280. package/format-notices/wav/NOTICE +14 -14
  281. package/format-notices/webm/LICENSE +21 -21
  282. package/format-notices/webm/NOTICE +14 -14
  283. package/format-notices/webp/LICENSE +21 -21
  284. package/format-notices/webp/NOTICE +14 -14
  285. package/format-notices/wem/LICENSE +57 -57
  286. package/format-notices/wem/NOTICE +33 -33
  287. package/format-notices/yaml/LICENSE +21 -21
  288. package/format-notices/yaml/NOTICE +44 -44
  289. package/package.json +51 -51
  290. package/resource-lifecycle.md +679 -487
  291. package/dist/generated/resources/AudioGeometryResData.js.map +0 -1
  292. package/dist/generated/resources/CmfVertexReader.js +0 -46
  293. package/dist/generated/resources/CmfVertexReader.js.map +0 -1
  294. package/dist/generated/resources/GStateBindingCallbackData.js.map +0 -1
  295. package/dist/generated/resources/MeshDecalData.js.map +0 -1
  296. package/dist/generated/resources/MeshDecalLodData.js.map +0 -1
  297. package/dist/generated/resources/Tr2AsyncSave.js +0 -46
  298. package/dist/generated/resources/Tr2AsyncSave.js.map +0 -1
  299. package/dist/generated/resources/Tr2CmfContents.js +0 -37
  300. package/dist/generated/resources/Tr2CmfContents.js.map +0 -1
  301. package/dist/generated/resources/Tr2GrannyIntersectionResult.js +0 -58
  302. package/dist/generated/resources/Tr2GrannyIntersectionResult.js.map +0 -1
  303. package/dist/generated/resources/Tr2LoadPrepareFence.js +0 -37
  304. package/dist/generated/resources/Tr2LoadPrepareFence.js.map +0 -1
  305. package/dist/generated/resources/Tr2MaterialArea.js.map +0 -1
  306. package/dist/generated/resources/Tr2MaterialMesh.js.map +0 -1
  307. package/dist/generated/resources/Tr2MaterialRes.js.map +0 -1
  308. package/dist/generated/resources/Tr2ShaderPermutation.js.map +0 -1
  309. package/dist/generated/resources/Tr2TextureLodManager.js.map +0 -1
  310. package/dist/generated/resources/Tr2TextureLodUpdateRequest.js.map +0 -1
  311. package/dist/generated/resources/Tr2TexturePackChannel.js.map +0 -1
  312. package/dist/generated/resources/Tr2TexturePipeline.js +0 -44
  313. package/dist/generated/resources/Tr2TexturePipeline.js.map +0 -1
  314. package/dist/generated/resources/Tr2TexturePipelineParams.js.map +0 -1
  315. package/dist/generated/resources/Tr2TexturePipelineStepCompress.js.map +0 -1
  316. package/dist/generated/resources/Tr2TexturePipelineStepLimitSize.js.map +0 -1
  317. package/dist/generated/resources/Tr2TexturePipelineStepLoad.js.map +0 -1
  318. package/dist/generated/resources/Tr2TexturePipelineStepPack.js.map +0 -1
  319. package/dist/generated/resources/TriGeometryResAreaData.js.map +0 -1
  320. package/dist/generated/resources/TriGeometryResJointData.js.map +0 -1
  321. package/dist/generated/resources/TriGeometryResLodData.js.map +0 -1
  322. package/dist/generated/resources/TriGeometryResMeshData.js.map +0 -1
  323. package/dist/generated/resources/TriGeometryResSkeletonData.js.map +0 -1
  324. package/dist/generated/resources/TriJointBinding.js.map +0 -1
  325. package/dist/generated/resources/TriMorphTargetGeometryConstants.js.map +0 -1
  326. package/dist/generated/resources/TriRtGeometryConstants.js.map +0 -1
  327. package/dist/generated/resources/enums.js.map +0 -1
  328. package/dist/generated/resources/index.js +0 -32
  329. package/dist/generated/resources/index.js.map +0 -1
@@ -1,245 +1,238 @@
1
- import { isSoundbanksInfo, parseSoundbanksInfo, buildSoundbanksCatalog, joinSoundbanksInfo, wwiseIdFromName } from './core/soundbanksInfo.js';
2
- import { DEFAULT_VALUES, normalizeValues, readWithValues, inspectWithValues, isSupportedWithValues, toJsonValue, toBytes, extractMedia, isBNK, OUTPUT_RAW, OUTPUT_JSON, OUTPUT_BNK_JSON, OUTPUT_MEDIA, HIRC_TYPE_NAMES } from './core/helpers.js';
3
-
4
- const FORMAT_NAME = "CjsBnkFormat";
5
-
6
- /**
7
- * Reader for Audiokinetic Wwise soundbank (.bnk) containers.
8
- *
9
- * Inspection decodes the bank header, embedded media index, object hierarchy
10
- * listing, and referenced bank names without copying payloads. Read can emit
11
- * the raw bank, debug JSON, or the embedded media items undecoded; Wwise
12
- * event/graph semantics are deliberately out of scope for this reader.
13
- */
14
- class CjsBnkFormat {
15
- #values = DEFAULT_VALUES;
16
-
17
- /**
18
- * Create a reusable bnk format profile.
19
- *
20
- * @param {object} [options] Default read/inspect options.
21
- */
22
- constructor(options = {}) {
23
- this.SetValues(options);
24
- }
25
-
26
- /**
27
- * Merge options into this profile.
28
- *
29
- * @param {object} [options] Values to merge.
30
- * @returns {CjsBnkFormat} This format profile.
31
- */
32
- SetValues(options = {}) {
33
- this.#values = normalizeValues(this.#values, options, FORMAT_NAME);
34
- return this;
35
- }
36
-
37
- /**
38
- * Get normalized profile values with optional per-call overrides.
39
- *
40
- * @param {object} [options] Per-call values.
41
- * @returns {object} Normalized read values.
42
- */
43
- GetValues(options = {}) {
44
- return normalizeValues(this.#values, options, FORMAT_NAME);
45
- }
46
-
47
- /**
48
- * Read soundbank bytes with this profile.
49
- *
50
- * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
51
- * @param {object} [options] Per-call values.
52
- * @returns {object} GPU-free raw/debug/media payload for the selected emit target.
53
- */
54
- Read(input, options = {}) {
55
- return readWithValues(input, this.GetValues(options));
56
- }
57
-
58
- /**
59
- * Read soundbank bytes asynchronously with this profile.
60
- *
61
- * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
62
- * @param {object} [options] Per-call values.
63
- * @returns {Promise<object>} GPU-free raw/debug/media payload for the selected emit target.
64
- */
65
- async ReadAsync(input, options = {}) {
66
- return this.Read(input, options);
67
- }
68
-
69
- /**
70
- * Inspect soundbank bytes without copying media payloads.
71
- *
72
- * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
73
- * @param {object} [options] Per-call values.
74
- * @returns {object} Soundbank metadata.
75
- */
76
- Inspect(input, options = {}) {
77
- return inspectWithValues(input, this.GetValues(options));
78
- }
79
-
80
- /**
81
- * Report whether soundbank input and requested output variants are supported.
82
- *
83
- * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
84
- * @param {object} [options] Per-call values.
85
- * @returns {object} Support/probe report.
86
- */
87
- IsSupported(input, options = {}) {
88
- return isSupportedWithValues(input, this.GetValues(options));
89
- }
90
-
91
- /**
92
- * Convert format output into JSON-compatible debug data.
93
- *
94
- * @param {any} value Format output.
95
- * @returns {any} JSON-compatible value.
96
- */
97
- ToJSON(value) {
98
- return toJsonValue(value);
99
- }
100
-
101
- /**
102
- * One-shot soundbank read.
103
- *
104
- * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
105
- * @param {object} [options] Read options.
106
- * @returns {object} GPU-free raw/debug/media payload for the selected emit target.
107
- */
108
- static read(input, options = {}) {
109
- return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
110
- }
111
-
112
- /**
113
- * One-shot asynchronous soundbank read.
114
- *
115
- * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
116
- * @param {object} [options] Read options.
117
- * @returns {Promise<object>} GPU-free raw/debug/media payload for the selected emit target.
118
- */
119
- static async readAsync(input, options = {}) {
120
- return CjsBnkFormat.read(input, options);
121
- }
122
-
123
- /**
124
- * One-shot soundbank inspection.
125
- *
126
- * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
127
- * @param {object} [options] Inspect options.
128
- * @returns {object} Soundbank metadata.
129
- */
130
- static inspect(input, options = {}) {
131
- return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
132
- }
133
-
134
- /**
135
- * One-shot soundbank support probe.
136
- *
137
- * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
138
- * @param {object} [options] Probe options.
139
- * @returns {object} Support/probe report.
140
- */
141
- static isSupported(input, options = {}) {
142
- return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
143
- }
144
-
145
- /**
146
- * Extract embedded media payloads as views over the soundbank bytes.
147
- *
148
- * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
149
- * @param {number} [mediaId] Optional single media id filter.
150
- * @returns {Array<object>} Extracted media items with undecoded bytes.
151
- */
152
- static extractMedia(input, mediaId) {
153
- const bytes = toBytes(input);
154
- const metadata = inspectWithValues(bytes, DEFAULT_VALUES);
155
- return extractMedia(bytes, metadata, mediaId);
156
- }
157
-
158
- /**
159
- * Convert format output into JSON-compatible debug data.
160
- *
161
- * @param {any} value Format output.
162
- * @returns {any} JSON-compatible value.
163
- */
164
- static toJSON(value) {
165
- return toJsonValue(value);
166
- }
167
-
168
- /**
169
- * Test whether input looks like a Wwise SoundbanksInfo document.
170
- *
171
- * @param {Uint8Array|ArrayBuffer|DataView|string|object} input Candidate document.
172
- * @returns {boolean} True when a SoundBanksInfo bank list is present.
173
- */
174
- static isSoundbanksInfo(input) {
175
- return isSoundbanksInfo(input);
176
- }
177
-
178
- /**
179
- * Parse a SoundbanksInfo document into a normalized summary.
180
- *
181
- * @param {Uint8Array|ArrayBuffer|DataView|string|object} input SoundbanksInfo JSON bytes, text, or object.
182
- * @returns {object} Normalized document summary with per-bank details.
183
- */
184
- static parseSoundbanksInfo(input) {
185
- return parseSoundbanksInfo(input);
186
- }
187
-
188
- /**
189
- * Build id-keyed lookup tables from a SoundbanksInfo document.
190
- *
191
- * @param {Uint8Array|ArrayBuffer|DataView|string|object} input SoundbanksInfo JSON bytes, text, or object.
192
- * @returns {object} Catalog with banksById, mediaById, eventsById, and eventsByName.
193
- */
194
- static buildSoundbanksCatalog(input) {
195
- return buildSoundbanksCatalog(input);
196
- }
197
-
198
- /**
199
- * Join a bank inspection result with a SoundbanksInfo catalog.
200
- *
201
- * @param {object} bankInfo Inspect output for a soundbank.
202
- * @param {object} catalog `buildSoundbanksCatalog` output.
203
- * @returns {object} Bank/media/event annotations for the inspected bank.
204
- */
205
- static joinSoundbanksInfo(bankInfo, catalog) {
206
- return joinSoundbanksInfo(bankInfo, catalog);
207
- }
208
-
209
- /**
210
- * Compute the Wwise 32-bit id for a bank, event, switch, or language name.
211
- *
212
- * @param {string} name Wwise object name.
213
- * @returns {number} Unsigned 32-bit Wwise id (FNV-1 of the lowercased name).
214
- */
215
- static wwiseIdFromName(name) {
216
- return wwiseIdFromName(name);
217
- }
218
-
219
- /**
220
- * Test whether bytes look like a Wwise soundbank.
221
- *
222
- * @param {Uint8Array|ArrayBuffer|DataView} input Candidate soundbank bytes.
223
- * @returns {boolean} True when the BKHD header chunk is present.
224
- */
225
- static isBNK(input) {
226
- try {
227
- return isBNK(toBytes(input));
228
- } catch {
229
- return false;
230
- }
231
- }
232
- static OUTPUT_RAW = OUTPUT_RAW;
233
- static OUTPUT_JSON = OUTPUT_JSON;
234
- static OUTPUT_BNK_JSON = OUTPUT_BNK_JSON;
235
- static OUTPUT_MEDIA = OUTPUT_MEDIA;
236
- static HIRC_TYPE_NAMES = HIRC_TYPE_NAMES;
237
- static type = Object.freeze(["audio"]);
238
- static mediaTypes = Object.freeze(["audio"]);
239
- static inputTypes = Object.freeze(["bnk"]);
240
- static outputTypes = Object.freeze([OUTPUT_RAW, OUTPUT_MEDIA]);
241
- static debugOutputTypes = Object.freeze([OUTPUT_BNK_JSON, OUTPUT_RAW]);
242
- }
243
-
244
- export { CjsBnkFormat };
245
- //# sourceMappingURL=CjsBnkFormat.js.map
1
+ import { wwiseIdFromName, joinSoundbanksInfo, buildSoundbanksCatalog, parseSoundbanksInfo, isSoundbanksInfo } from './core/soundbanksInfo.js';
2
+ import { DEFAULT_VALUES, normalizeValues, readWithValues, inspectWithValues, isSupportedWithValues, toJsonValue, toBytes, extractMedia, isBNK, OUTPUT_MEDIA, OUTPUT_BNK_JSON, OUTPUT_JSON, OUTPUT_RAW, HIRC_TYPE_NAMES } from './core/helpers.js';
3
+ import { eventMediaFromBanks } from './core/graph.js';
4
+ import { parseMusicSwitch, parseMusicPlaylist, parseMusicTrack, parseMusicSegment, musicNodesFromBanks } from './core/musicNodes.js';
5
+
6
+ const FORMAT_NAME = "CjsBnkFormat";
7
+
8
+ /**
9
+ * Reader for Audiokinetic Wwise soundbank (.bnk) containers.
10
+ *
11
+ * Inspection decodes the bank header, embedded media index, object hierarchy
12
+ * listing (with version-stable typed fields), and referenced bank names
13
+ * without copying payloads. Read can emit the raw bank, debug JSON, or the
14
+ * embedded media items undecoded. The read path stays a pure container
15
+ * reader; the Wwise-domain toolkit (SoundbanksInfo catalog helpers, id hash,
16
+ * event -> media graph resolution) is grouped under the `wwise` static.
17
+ */
18
+ class CjsBnkFormat {
19
+ #values = DEFAULT_VALUES;
20
+
21
+ /**
22
+ * Create a reusable bnk format profile.
23
+ *
24
+ * @param {object} [options] Default read/inspect options.
25
+ */
26
+ constructor(options = {}) {
27
+ this.SetValues(options);
28
+ }
29
+
30
+ /**
31
+ * Merge options into this profile.
32
+ *
33
+ * @param {object} [options] Values to merge.
34
+ * @returns {CjsBnkFormat} This format profile.
35
+ */
36
+ SetValues(options = {}) {
37
+ this.#values = normalizeValues(this.#values, options, FORMAT_NAME);
38
+ return this;
39
+ }
40
+
41
+ /**
42
+ * Get normalized profile values with optional per-call overrides.
43
+ *
44
+ * @param {object} [options] Per-call values.
45
+ * @returns {object} Normalized read values.
46
+ */
47
+ GetValues(options = {}) {
48
+ return normalizeValues(this.#values, options, FORMAT_NAME);
49
+ }
50
+
51
+ /**
52
+ * Read soundbank bytes with this profile.
53
+ *
54
+ * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
55
+ * @param {object} [options] Per-call values.
56
+ * @returns {object} GPU-free raw/debug/media payload for the selected emit target.
57
+ */
58
+ Read(input, options = {}) {
59
+ return readWithValues(input, this.GetValues(options));
60
+ }
61
+
62
+ /**
63
+ * Read soundbank bytes asynchronously with this profile.
64
+ *
65
+ * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
66
+ * @param {object} [options] Per-call values.
67
+ * @returns {Promise<object>} GPU-free raw/debug/media payload for the selected emit target.
68
+ */
69
+ async ReadAsync(input, options = {}) {
70
+ return this.Read(input, options);
71
+ }
72
+
73
+ /**
74
+ * Inspect soundbank bytes without copying media payloads.
75
+ *
76
+ * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
77
+ * @param {object} [options] Per-call values.
78
+ * @returns {object} Soundbank metadata.
79
+ */
80
+ Inspect(input, options = {}) {
81
+ return inspectWithValues(input, this.GetValues(options));
82
+ }
83
+
84
+ /**
85
+ * Report whether soundbank input and requested output variants are supported.
86
+ *
87
+ * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
88
+ * @param {object} [options] Per-call values.
89
+ * @returns {object} Support/probe report.
90
+ */
91
+ IsSupported(input, options = {}) {
92
+ return isSupportedWithValues(input, this.GetValues(options));
93
+ }
94
+
95
+ /**
96
+ * Convert format output into JSON-compatible debug data.
97
+ *
98
+ * @param {any} value Format output.
99
+ * @returns {any} JSON-compatible value.
100
+ */
101
+ ToJSON(value) {
102
+ return toJsonValue(value);
103
+ }
104
+
105
+ /**
106
+ * One-shot soundbank read.
107
+ *
108
+ * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
109
+ * @param {object} [options] Read options.
110
+ * @returns {object} GPU-free raw/debug/media payload for the selected emit target.
111
+ */
112
+ static read(input, options = {}) {
113
+ return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
114
+ }
115
+
116
+ /**
117
+ * One-shot asynchronous soundbank read.
118
+ *
119
+ * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
120
+ * @param {object} [options] Read options.
121
+ * @returns {Promise<object>} GPU-free raw/debug/media payload for the selected emit target.
122
+ */
123
+ static async readAsync(input, options = {}) {
124
+ return CjsBnkFormat.read(input, options);
125
+ }
126
+
127
+ /**
128
+ * One-shot soundbank inspection.
129
+ *
130
+ * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
131
+ * @param {object} [options] Inspect options.
132
+ * @returns {object} Soundbank metadata.
133
+ */
134
+ static inspect(input, options = {}) {
135
+ return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
136
+ }
137
+
138
+ /**
139
+ * One-shot soundbank support probe.
140
+ *
141
+ * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
142
+ * @param {object} [options] Probe options.
143
+ * @returns {object} Support/probe report.
144
+ */
145
+ static isSupported(input, options = {}) {
146
+ return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
147
+ }
148
+
149
+ /**
150
+ * Extract embedded media payloads as views over the soundbank bytes.
151
+ *
152
+ * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.
153
+ * @param {number} [mediaId] Optional single media id filter.
154
+ * @returns {Array<object>} Extracted media items with undecoded bytes.
155
+ */
156
+ static extractMedia(input, mediaId) {
157
+ const bytes = toBytes(input);
158
+ const metadata = inspectWithValues(bytes, DEFAULT_VALUES);
159
+ return extractMedia(bytes, metadata, mediaId);
160
+ }
161
+
162
+ /**
163
+ * Convert format output into JSON-compatible debug data.
164
+ *
165
+ * @param {any} value Format output.
166
+ * @returns {any} JSON-compatible value.
167
+ */
168
+ static toJSON(value) {
169
+ return toJsonValue(value);
170
+ }
171
+
172
+ /**
173
+ * Test whether bytes look like a Wwise soundbank.
174
+ *
175
+ * @param {Uint8Array|ArrayBuffer|DataView} input Candidate soundbank bytes.
176
+ * @returns {boolean} True when the BKHD header chunk is present.
177
+ */
178
+ static isBNK(input) {
179
+ try {
180
+ return isBNK(toBytes(input));
181
+ } catch {
182
+ return false;
183
+ }
184
+ }
185
+
186
+ /**
187
+ * Wwise-domain toolkit, grouped apart from the container-reading statics -
188
+ * the single home for the SoundbanksInfo catalog helpers
189
+ * (`isSoundbanksInfo`, `parseSoundbanksInfo`, `buildSoundbanksCatalog`,
190
+ * `joinSoundbanksInfo`), the id hash (`wwiseIdFromName`, FNV-1 of the
191
+ * lowercased name), and event-graph resolution.
192
+ *
193
+ * `eventMediaFromBanks(inspections, options)` is graph interpretation over
194
+ * `inspect()` results, not a read path: banks may split events from their
195
+ * target objects (EVE keeps all events in one bank and their sounds in
196
+ * others), so always pass every related bank to one call. Returns
197
+ * `{ eventMedia: Map<eventObjectId, Set<wemId>>, diagnostics }`. See
198
+ * core/graph.js for the walk policy.
199
+ *
200
+ * The interactive-music decoders (`musicNodesFromBanks` and the per-type
201
+ * `parseMusicSegment/Track/Playlist/Switch`) turn the music-hierarchy
202
+ * entries (HIRC 10-13) into typed nodes - children, meter, cue markers,
203
+ * clips, playlist trees, decision trees, and transition rules. See
204
+ * core/musicNodes.js for the anchored, exact-end-validated parse.
205
+ */
206
+ static wwise = Object.freeze({
207
+ isSoundbanksInfo,
208
+ parseSoundbanksInfo,
209
+ buildSoundbanksCatalog,
210
+ joinSoundbanksInfo,
211
+ wwiseIdFromName,
212
+ eventMediaFromBanks,
213
+ musicNodesFromBanks,
214
+ parseMusicSegment,
215
+ parseMusicTrack,
216
+ parseMusicPlaylist,
217
+ parseMusicSwitch
218
+ });
219
+
220
+ /**
221
+ * Emit targets for this format (canonical frozen enum).
222
+ */
223
+ static Output = Object.freeze({
224
+ RAW: OUTPUT_RAW,
225
+ JSON: OUTPUT_JSON,
226
+ BNK_JSON: OUTPUT_BNK_JSON,
227
+ MEDIA: OUTPUT_MEDIA
228
+ });
229
+ static HIRC_TYPE_NAMES = HIRC_TYPE_NAMES;
230
+ static type = Object.freeze(["audio"]);
231
+ static mediaTypes = Object.freeze(["audio"]);
232
+ static inputTypes = Object.freeze(["bnk"]);
233
+ static outputTypes = Object.freeze([OUTPUT_RAW, OUTPUT_MEDIA]);
234
+ static debugOutputTypes = Object.freeze([OUTPUT_BNK_JSON, OUTPUT_RAW]);
235
+ }
236
+
237
+ export { CjsBnkFormat };
238
+ //# sourceMappingURL=CjsBnkFormat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CjsBnkFormat.js","sources":["../../../../src/formats/bnk/CjsBnkFormat.js"],"sourcesContent":["import {\n buildSoundbanksCatalog,\n isSoundbanksInfo,\n joinSoundbanksInfo,\n parseSoundbanksInfo,\n wwiseIdFromName\n} from \"./core/soundbanksInfo.js\";\nimport {\n DEFAULT_VALUES,\n HIRC_TYPE_NAMES,\n OUTPUT_BNK_JSON,\n OUTPUT_JSON,\n OUTPUT_MEDIA,\n OUTPUT_RAW,\n extractMedia,\n inspectWithValues,\n isBNK,\n isSupportedWithValues,\n normalizeValues,\n readWithValues,\n toBytes,\n toJsonValue\n} from \"./core/helpers.js\";\n\nconst FORMAT_NAME = \"CjsBnkFormat\";\n\n/**\n * Reader for Audiokinetic Wwise soundbank (.bnk) containers.\n *\n * Inspection decodes the bank header, embedded media index, object hierarchy\n * listing, and referenced bank names without copying payloads. Read can emit\n * the raw bank, debug JSON, or the embedded media items undecoded; Wwise\n * event/graph semantics are deliberately out of scope for this reader.\n */\nexport class CjsBnkFormat\n{\n #values = DEFAULT_VALUES;\n\n /**\n * Create a reusable bnk format profile.\n *\n * @param {object} [options] Default read/inspect options.\n */\n constructor(options = {})\n {\n this.SetValues(options);\n }\n\n /**\n * Merge options into this profile.\n *\n * @param {object} [options] Values to merge.\n * @returns {CjsBnkFormat} This format profile.\n */\n SetValues(options = {})\n {\n this.#values = normalizeValues(this.#values, options, FORMAT_NAME);\n return this;\n }\n\n /**\n * Get normalized profile values with optional per-call overrides.\n *\n * @param {object} [options] Per-call values.\n * @returns {object} Normalized read values.\n */\n GetValues(options = {})\n {\n return normalizeValues(this.#values, options, FORMAT_NAME);\n }\n\n /**\n * Read soundbank bytes with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} GPU-free raw/debug/media payload for the selected emit target.\n */\n Read(input, options = {})\n {\n return readWithValues(input, this.GetValues(options));\n }\n\n /**\n * Read soundbank bytes asynchronously with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\n * @param {object} [options] Per-call values.\n * @returns {Promise<object>} GPU-free raw/debug/media payload for the selected emit target.\n */\n async ReadAsync(input, options = {})\n {\n return this.Read(input, options);\n }\n\n /**\n * Inspect soundbank bytes without copying media payloads.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Soundbank metadata.\n */\n Inspect(input, options = {})\n {\n return inspectWithValues(input, this.GetValues(options));\n }\n\n /**\n * Report whether soundbank input and requested output variants are supported.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Support/probe report.\n */\n IsSupported(input, options = {})\n {\n return isSupportedWithValues(input, this.GetValues(options));\n }\n\n /**\n * Convert format output into JSON-compatible debug data.\n *\n * @param {any} value Format output.\n * @returns {any} JSON-compatible value.\n */\n ToJSON(value)\n {\n return toJsonValue(value);\n }\n\n /**\n * One-shot soundbank read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\n * @param {object} [options] Read options.\n * @returns {object} GPU-free raw/debug/media payload for the selected emit target.\n */\n static read(input, options = {})\n {\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * One-shot asynchronous soundbank read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\n * @param {object} [options] Read options.\n * @returns {Promise<object>} GPU-free raw/debug/media payload for the selected emit target.\n */\n static async readAsync(input, options = {})\n {\n return CjsBnkFormat.read(input, options);\n }\n\n /**\n * One-shot soundbank inspection.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\n * @param {object} [options] Inspect options.\n * @returns {object} Soundbank metadata.\n */\n static inspect(input, options = {})\n {\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * One-shot soundbank support probe.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\n * @param {object} [options] Probe options.\n * @returns {object} Support/probe report.\n */\n static isSupported(input, options = {})\n {\n return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * Extract embedded media payloads as views over the soundbank bytes.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\n * @param {number} [mediaId] Optional single media id filter.\n * @returns {Array<object>} Extracted media items with undecoded bytes.\n */\n static extractMedia(input, mediaId)\n {\n const bytes = toBytes(input);\n const metadata = inspectWithValues(bytes, DEFAULT_VALUES);\n return extractMedia(bytes, metadata, mediaId);\n }\n\n /**\n * Convert format output into JSON-compatible debug data.\n *\n * @param {any} value Format output.\n * @returns {any} JSON-compatible value.\n */\n static toJSON(value)\n {\n return toJsonValue(value);\n }\n\n /**\n * Test whether input looks like a Wwise SoundbanksInfo document.\n *\n * @param {Uint8Array|ArrayBuffer|DataView|string|object} input Candidate document.\n * @returns {boolean} True when a SoundBanksInfo bank list is present.\n */\n static isSoundbanksInfo(input)\n {\n return isSoundbanksInfo(input);\n }\n\n /**\n * Parse a SoundbanksInfo document into a normalized summary.\n *\n * @param {Uint8Array|ArrayBuffer|DataView|string|object} input SoundbanksInfo JSON bytes, text, or object.\n * @returns {object} Normalized document summary with per-bank details.\n */\n static parseSoundbanksInfo(input)\n {\n return parseSoundbanksInfo(input);\n }\n\n /**\n * Build id-keyed lookup tables from a SoundbanksInfo document.\n *\n * @param {Uint8Array|ArrayBuffer|DataView|string|object} input SoundbanksInfo JSON bytes, text, or object.\n * @returns {object} Catalog with banksById, mediaById, eventsById, and eventsByName.\n */\n static buildSoundbanksCatalog(input)\n {\n return buildSoundbanksCatalog(input);\n }\n\n /**\n * Join a bank inspection result with a SoundbanksInfo catalog.\n *\n * @param {object} bankInfo Inspect output for a soundbank.\n * @param {object} catalog `buildSoundbanksCatalog` output.\n * @returns {object} Bank/media/event annotations for the inspected bank.\n */\n static joinSoundbanksInfo(bankInfo, catalog)\n {\n return joinSoundbanksInfo(bankInfo, catalog);\n }\n\n /**\n * Compute the Wwise 32-bit id for a bank, event, switch, or language name.\n *\n * @param {string} name Wwise object name.\n * @returns {number} Unsigned 32-bit Wwise id (FNV-1 of the lowercased name).\n */\n static wwiseIdFromName(name)\n {\n return wwiseIdFromName(name);\n }\n\n /**\n * Test whether bytes look like a Wwise soundbank.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Candidate soundbank bytes.\n * @returns {boolean} True when the BKHD header chunk is present.\n */\n static isBNK(input)\n {\n try\n {\n return isBNK(toBytes(input));\n }\n catch\n {\n return false;\n }\n }\n\n static OUTPUT_RAW = OUTPUT_RAW;\n static OUTPUT_JSON = OUTPUT_JSON;\n static OUTPUT_BNK_JSON = OUTPUT_BNK_JSON;\n static OUTPUT_MEDIA = OUTPUT_MEDIA;\n static HIRC_TYPE_NAMES = HIRC_TYPE_NAMES;\n static type = Object.freeze([ \"audio\" ]);\n static mediaTypes = Object.freeze([ \"audio\" ]);\n static inputTypes = Object.freeze([ \"bnk\" ]);\n static outputTypes = Object.freeze([ OUTPUT_RAW, OUTPUT_MEDIA ]);\n static debugOutputTypes = Object.freeze([ OUTPUT_BNK_JSON, OUTPUT_RAW ]);\n}\n\nexport default CjsBnkFormat;\n"],"names":["FORMAT_NAME","CjsBnkFormat","DEFAULT_VALUES","constructor","options","SetValues","normalizeValues","GetValues","Read","input","readWithValues","ReadAsync","Inspect","inspectWithValues","IsSupported","isSupportedWithValues","ToJSON","value","toJsonValue","read","readAsync","inspect","isSupported","extractMedia","mediaId","bytes","toBytes","metadata","toJSON","isSoundbanksInfo","parseSoundbanksInfo","buildSoundbanksCatalog","joinSoundbanksInfo","bankInfo","catalog","wwiseIdFromName","name","isBNK","OUTPUT_RAW","OUTPUT_JSON","OUTPUT_BNK_JSON","OUTPUT_MEDIA","HIRC_TYPE_NAMES","type","Object","freeze","mediaTypes","inputTypes","outputTypes","debugOutputTypes"],"mappings":";;;AAwBA,MAAMA,WAAW,GAAG,cAAc;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,CACzB;EACI,OAAO,GAAGC,cAAc;;AAExB;AACJ;AACA;AACA;AACA;AACIC,EAAAA,WAAWA,CAACC,OAAO,GAAG,EAAE,EACxB;AACI,IAAA,IAAI,CAACC,SAAS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;EACxC,OAAOC,UAAU,GAAGF,MAAM,CAACC,MAAM,CAAC,CAAE,OAAO,CAAE,CAAC;EAC9C,OAAOE,UAAU,GAAGH,MAAM,CAACC,MAAM,CAAC,CAAE,KAAK,CAAE,CAAC;EAC5C,OAAOG,WAAW,GAAGJ,MAAM,CAACC,MAAM,CAAC,CAAEP,UAAU,EAAEG,YAAY,CAAE,CAAC;EAChE,OAAOQ,gBAAgB,GAAGL,MAAM,CAACC,MAAM,CAAC,CAAEL,eAAe,EAAEF,UAAU,CAAE,CAAC;AAC5E;;;;"}
1
+ {"version":3,"file":"CjsBnkFormat.js","sources":["../../../../src/formats/bnk/CjsBnkFormat.js"],"sourcesContent":["import {\r\n buildSoundbanksCatalog,\r\n isSoundbanksInfo,\r\n joinSoundbanksInfo,\r\n parseSoundbanksInfo,\r\n wwiseIdFromName\r\n} from \"./core/soundbanksInfo.js\";\r\nimport {\r\n DEFAULT_VALUES,\r\n HIRC_TYPE_NAMES,\r\n OUTPUT_BNK_JSON,\r\n OUTPUT_JSON,\r\n OUTPUT_MEDIA,\r\n OUTPUT_RAW,\r\n extractMedia,\r\n inspectWithValues,\r\n isBNK,\r\n isSupportedWithValues,\r\n normalizeValues,\r\n readWithValues,\r\n toBytes,\r\n toJsonValue\r\n} from \"./core/helpers.js\";\r\nimport { eventMediaFromBanks } from \"./core/graph.js\";\r\nimport {\r\n musicNodesFromBanks,\r\n parseMusicPlaylist,\r\n parseMusicSegment,\r\n parseMusicSwitch,\r\n parseMusicTrack\r\n} from \"./core/musicNodes.js\";\r\n\r\nconst FORMAT_NAME = \"CjsBnkFormat\";\r\n\r\n/**\r\n * Reader for Audiokinetic Wwise soundbank (.bnk) containers.\r\n *\r\n * Inspection decodes the bank header, embedded media index, object hierarchy\r\n * listing (with version-stable typed fields), and referenced bank names\r\n * without copying payloads. Read can emit the raw bank, debug JSON, or the\r\n * embedded media items undecoded. The read path stays a pure container\r\n * reader; the Wwise-domain toolkit (SoundbanksInfo catalog helpers, id hash,\r\n * event -> media graph resolution) is grouped under the `wwise` static.\r\n */\r\nexport class CjsBnkFormat\r\n{\r\n #values = DEFAULT_VALUES;\r\n\r\n /**\r\n * Create a reusable bnk format profile.\r\n *\r\n * @param {object} [options] Default read/inspect options.\r\n */\r\n constructor(options = {})\r\n {\r\n this.SetValues(options);\r\n }\r\n\r\n /**\r\n * Merge options into this profile.\r\n *\r\n * @param {object} [options] Values to merge.\r\n * @returns {CjsBnkFormat} This format profile.\r\n */\r\n SetValues(options = {})\r\n {\r\n this.#values = normalizeValues(this.#values, options, FORMAT_NAME);\r\n return this;\r\n }\r\n\r\n /**\r\n * Get normalized profile values with optional per-call overrides.\r\n *\r\n * @param {object} [options] Per-call values.\r\n * @returns {object} Normalized read values.\r\n */\r\n GetValues(options = {})\r\n {\r\n return normalizeValues(this.#values, options, FORMAT_NAME);\r\n }\r\n\r\n /**\r\n * Read soundbank bytes with this profile.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\r\n * @param {object} [options] Per-call values.\r\n * @returns {object} GPU-free raw/debug/media payload for the selected emit target.\r\n */\r\n Read(input, options = {})\r\n {\r\n return readWithValues(input, this.GetValues(options));\r\n }\r\n\r\n /**\r\n * Read soundbank bytes asynchronously with this profile.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\r\n * @param {object} [options] Per-call values.\r\n * @returns {Promise<object>} GPU-free raw/debug/media payload for the selected emit target.\r\n */\r\n async ReadAsync(input, options = {})\r\n {\r\n return this.Read(input, options);\r\n }\r\n\r\n /**\r\n * Inspect soundbank bytes without copying media payloads.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\r\n * @param {object} [options] Per-call values.\r\n * @returns {object} Soundbank metadata.\r\n */\r\n Inspect(input, options = {})\r\n {\r\n return inspectWithValues(input, this.GetValues(options));\r\n }\r\n\r\n /**\r\n * Report whether soundbank input and requested output variants are supported.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\r\n * @param {object} [options] Per-call values.\r\n * @returns {object} Support/probe report.\r\n */\r\n IsSupported(input, options = {})\r\n {\r\n return isSupportedWithValues(input, this.GetValues(options));\r\n }\r\n\r\n /**\r\n * Convert format output into JSON-compatible debug data.\r\n *\r\n * @param {any} value Format output.\r\n * @returns {any} JSON-compatible value.\r\n */\r\n ToJSON(value)\r\n {\r\n return toJsonValue(value);\r\n }\r\n\r\n /**\r\n * One-shot soundbank read.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\r\n * @param {object} [options] Read options.\r\n * @returns {object} GPU-free raw/debug/media payload for the selected emit target.\r\n */\r\n static read(input, options = {})\r\n {\r\n return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\r\n }\r\n\r\n /**\r\n * One-shot asynchronous soundbank read.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\r\n * @param {object} [options] Read options.\r\n * @returns {Promise<object>} GPU-free raw/debug/media payload for the selected emit target.\r\n */\r\n static async readAsync(input, options = {})\r\n {\r\n return CjsBnkFormat.read(input, options);\r\n }\r\n\r\n /**\r\n * One-shot soundbank inspection.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\r\n * @param {object} [options] Inspect options.\r\n * @returns {object} Soundbank metadata.\r\n */\r\n static inspect(input, options = {})\r\n {\r\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\r\n }\r\n\r\n /**\r\n * One-shot soundbank support probe.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\r\n * @param {object} [options] Probe options.\r\n * @returns {object} Support/probe report.\r\n */\r\n static isSupported(input, options = {})\r\n {\r\n return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\r\n }\r\n\r\n /**\r\n * Extract embedded media payloads as views over the soundbank bytes.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Soundbank bytes.\r\n * @param {number} [mediaId] Optional single media id filter.\r\n * @returns {Array<object>} Extracted media items with undecoded bytes.\r\n */\r\n static extractMedia(input, mediaId)\r\n {\r\n const bytes = toBytes(input);\r\n const metadata = inspectWithValues(bytes, DEFAULT_VALUES);\r\n return extractMedia(bytes, metadata, mediaId);\r\n }\r\n\r\n /**\r\n * Convert format output into JSON-compatible debug data.\r\n *\r\n * @param {any} value Format output.\r\n * @returns {any} JSON-compatible value.\r\n */\r\n static toJSON(value)\r\n {\r\n return toJsonValue(value);\r\n }\r\n\r\n /**\r\n * Test whether bytes look like a Wwise soundbank.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Candidate soundbank bytes.\r\n * @returns {boolean} True when the BKHD header chunk is present.\r\n */\r\n static isBNK(input)\r\n {\r\n try\r\n {\r\n return isBNK(toBytes(input));\r\n }\r\n catch\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Wwise-domain toolkit, grouped apart from the container-reading statics -\r\n * the single home for the SoundbanksInfo catalog helpers\r\n * (`isSoundbanksInfo`, `parseSoundbanksInfo`, `buildSoundbanksCatalog`,\r\n * `joinSoundbanksInfo`), the id hash (`wwiseIdFromName`, FNV-1 of the\r\n * lowercased name), and event-graph resolution.\r\n *\r\n * `eventMediaFromBanks(inspections, options)` is graph interpretation over\r\n * `inspect()` results, not a read path: banks may split events from their\r\n * target objects (EVE keeps all events in one bank and their sounds in\r\n * others), so always pass every related bank to one call. Returns\r\n * `{ eventMedia: Map<eventObjectId, Set<wemId>>, diagnostics }`. See\r\n * core/graph.js for the walk policy.\r\n *\r\n * The interactive-music decoders (`musicNodesFromBanks` and the per-type\r\n * `parseMusicSegment/Track/Playlist/Switch`) turn the music-hierarchy\r\n * entries (HIRC 10-13) into typed nodes - children, meter, cue markers,\r\n * clips, playlist trees, decision trees, and transition rules. See\r\n * core/musicNodes.js for the anchored, exact-end-validated parse.\r\n */\r\n static wwise = Object.freeze({\r\n isSoundbanksInfo,\r\n parseSoundbanksInfo,\r\n buildSoundbanksCatalog,\r\n joinSoundbanksInfo,\r\n wwiseIdFromName,\r\n eventMediaFromBanks,\r\n musicNodesFromBanks,\r\n parseMusicSegment,\r\n parseMusicTrack,\r\n parseMusicPlaylist,\r\n parseMusicSwitch\r\n });\r\n\r\n /**\r\n * Emit targets for this format (canonical frozen enum).\r\n */\r\n static Output = Object.freeze({\r\n RAW: OUTPUT_RAW,\r\n JSON: OUTPUT_JSON,\r\n BNK_JSON: OUTPUT_BNK_JSON,\r\n MEDIA: OUTPUT_MEDIA\r\n });\r\n\r\n static HIRC_TYPE_NAMES = HIRC_TYPE_NAMES;\r\n\r\n static type = Object.freeze([ \"audio\" ]);\r\n\r\n static mediaTypes = Object.freeze([ \"audio\" ]);\r\n\r\n static inputTypes = Object.freeze([ \"bnk\" ]);\r\n\r\n static outputTypes = Object.freeze([ OUTPUT_RAW, OUTPUT_MEDIA ]);\r\n\r\n static debugOutputTypes = Object.freeze([ OUTPUT_BNK_JSON, OUTPUT_RAW ]);\r\n}\r\n\r\nexport default CjsBnkFormat;\r\n"],"names":["FORMAT_NAME","CjsBnkFormat","DEFAULT_VALUES","constructor","options","SetValues","normalizeValues","GetValues","Read","input","readWithValues","ReadAsync","Inspect","inspectWithValues","IsSupported","isSupportedWithValues","ToJSON","value","toJsonValue","read","readAsync","inspect","isSupported","extractMedia","mediaId","bytes","toBytes","metadata","toJSON","isBNK","wwise","Object","freeze","isSoundbanksInfo","parseSoundbanksInfo","buildSoundbanksCatalog","joinSoundbanksInfo","wwiseIdFromName","eventMediaFromBanks","musicNodesFromBanks","parseMusicSegment","parseMusicTrack","parseMusicPlaylist","parseMusicSwitch","Output","RAW","OUTPUT_RAW","JSON","OUTPUT_JSON","BNK_JSON","OUTPUT_BNK_JSON","MEDIA","OUTPUT_MEDIA","HIRC_TYPE_NAMES","type","mediaTypes","inputTypes","outputTypes","debugOutputTypes"],"mappings":";;;;;AAgCA,MAAMA,WA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