@carbonenginejs/runtime-resource 0.19.2 → 0.22.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 (308) hide show
  1. package/NOTICE +6 -0
  2. package/dist/CjsResMan.js +1374 -1318
  3. package/dist/CjsResMan.js.map +1 -1
  4. package/dist/format/CjsFormat.js +393 -164
  5. package/dist/format/CjsFormat.js.map +1 -1
  6. package/dist/format/CjsFormatStore.js +315 -0
  7. package/dist/format/CjsFormatStore.js.map +1 -0
  8. package/dist/format/CjsResourceProbe.js +66 -234
  9. package/dist/format/CjsResourceProbe.js.map +1 -1
  10. package/dist/format/payloadContract.js +47 -6
  11. package/dist/format/payloadContract.js.map +1 -1
  12. package/dist/formats/black/CjsBlackFormat.js +23 -6
  13. package/dist/formats/black/CjsBlackFormat.js.map +1 -1
  14. package/dist/formats/bnk/CjsBnkFormat.js +122 -120
  15. package/dist/formats/bnk/CjsBnkFormat.js.map +1 -1
  16. package/dist/formats/bnk/core/helpers.js +5 -15
  17. package/dist/formats/bnk/core/helpers.js.map +1 -1
  18. package/dist/formats/cmf/CjsCmfFormat.js +31 -14
  19. package/dist/formats/cmf/CjsCmfFormat.js.map +1 -1
  20. package/dist/formats/dds/CjsDdsFormat.js +29 -19
  21. package/dist/formats/dds/CjsDdsFormat.js.map +1 -1
  22. package/dist/formats/dds/core/helpers.js +4 -5
  23. package/dist/formats/dds/core/helpers.js.map +1 -1
  24. package/dist/formats/dxbc/CjsDxbcFormat.js +15 -13
  25. package/dist/formats/dxbc/CjsDxbcFormat.js.map +1 -1
  26. package/dist/formats/fbx/CjsFbxFormat.js +27 -19
  27. package/dist/formats/fbx/CjsFbxFormat.js.map +1 -1
  28. package/dist/formats/fbx/core/helpers.js +4 -4
  29. package/dist/formats/fbx/core/helpers.js.map +1 -1
  30. package/dist/formats/flac/CjsFlacFormat.js +19 -17
  31. package/dist/formats/flac/CjsFlacFormat.js.map +1 -1
  32. package/dist/formats/flac/core/helpers.js +5 -11
  33. package/dist/formats/flac/core/helpers.js.map +1 -1
  34. package/dist/formats/fsd/32/CjsFsd32Format.js +55 -0
  35. package/dist/formats/fsd/32/CjsFsd32Format.js.map +1 -0
  36. package/dist/formats/fsd/32/index.js +2 -0
  37. package/dist/formats/fsd/32/index.js.map +1 -0
  38. package/dist/formats/fsd/64/CjsFsd64Format.js +119 -0
  39. package/dist/formats/fsd/64/CjsFsd64Format.js.map +1 -0
  40. package/dist/formats/fsd/64/core/CjsFsd64Binary.js +393 -0
  41. package/dist/formats/fsd/64/core/CjsFsd64Binary.js.map +1 -0
  42. package/dist/formats/fsd/64/core/CjsFsd64Reader.js +138 -0
  43. package/dist/formats/fsd/64/core/CjsFsd64Reader.js.map +1 -0
  44. package/dist/formats/fsd/64/core/CjsFsd64SchemaDecoder.js +389 -0
  45. package/dist/formats/fsd/64/core/CjsFsd64SchemaDecoder.js.map +1 -0
  46. package/dist/formats/fsd/64/core/CjsFsd64SchemaReader.js +43 -0
  47. package/dist/formats/fsd/64/core/CjsFsd64SchemaReader.js.map +1 -0
  48. package/dist/formats/fsd/64/core/fsd64Records.js +60 -0
  49. package/dist/formats/fsd/64/core/fsd64Records.js.map +1 -0
  50. package/dist/formats/fsd/64/index.js +7 -0
  51. package/dist/formats/fsd/64/index.js.map +1 -0
  52. package/dist/formats/fsd/64/readers/CjsFsd64ReaderSetCharacterStaticData.js +33 -0
  53. package/dist/formats/fsd/64/readers/CjsFsd64ReaderSetCharacterStaticData.js.map +1 -0
  54. package/dist/formats/fsd/64/readers/CjsFsd64SchemaAgentTypes.js +35 -0
  55. package/dist/formats/fsd/64/readers/CjsFsd64SchemaAgentTypes.js.map +1 -0
  56. package/dist/formats/fsd/64/readers/CjsFsd64SchemaAgentsInSpace.js +50 -0
  57. package/dist/formats/fsd/64/readers/CjsFsd64SchemaAgentsInSpace.js.map +1 -0
  58. package/dist/formats/fsd/64/readers/CjsFsd64SchemaAncestries.js +75 -0
  59. package/dist/formats/fsd/64/readers/CjsFsd64SchemaAncestries.js.map +1 -0
  60. package/dist/formats/fsd/64/readers/CjsFsd64SchemaArchetypes.js +57 -0
  61. package/dist/formats/fsd/64/readers/CjsFsd64SchemaArchetypes.js.map +1 -0
  62. package/dist/formats/fsd/64/readers/CjsFsd64SchemaAudioMetadata.js +201 -0
  63. package/dist/formats/fsd/64/readers/CjsFsd64SchemaAudioMetadata.js.map +1 -0
  64. package/dist/formats/fsd/64/readers/CjsFsd64SchemaBloodlines.js +73 -0
  65. package/dist/formats/fsd/64/readers/CjsFsd64SchemaBloodlines.js.map +1 -0
  66. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCategories.js +53 -0
  67. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCategories.js.map +1 -0
  68. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterAvatarBehaviors.js +44 -0
  69. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterAvatarBehaviors.js.map +1 -0
  70. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterColorLocations.js +38 -0
  71. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterColorLocations.js.map +1 -0
  72. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterColorNames.js +34 -0
  73. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterColorNames.js.map +1 -0
  74. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterModifierLocations.js +34 -0
  75. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterModifierLocations.js.map +1 -0
  76. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterPortraitResources.js +44 -0
  77. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterPortraitResources.js.map +1 -0
  78. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterResources.js +81 -0
  79. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterResources.js.map +1 -0
  80. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterSculptingLocations.js +34 -0
  81. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCharacterSculptingLocations.js.map +1 -0
  82. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCompressibleTypes.js +41 -0
  83. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCompressibleTypes.js.map +1 -0
  84. package/dist/formats/fsd/64/readers/CjsFsd64SchemaContrabandTypes.js +63 -0
  85. package/dist/formats/fsd/64/readers/CjsFsd64SchemaContrabandTypes.js.map +1 -0
  86. package/dist/formats/fsd/64/readers/CjsFsd64SchemaControlTowerResources.js +76 -0
  87. package/dist/formats/fsd/64/readers/CjsFsd64SchemaControlTowerResources.js.map +1 -0
  88. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationActivities.js +38 -0
  89. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationActivities.js.map +1 -0
  90. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationRoleGroups.js +74 -0
  91. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationRoleGroups.js.map +1 -0
  92. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationRoles.js +59 -0
  93. package/dist/formats/fsd/64/readers/CjsFsd64SchemaCorporationRoles.js.map +1 -0
  94. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaAttributeCategories.js +46 -0
  95. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaAttributeCategories.js.map +1 -0
  96. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaAttributes.js +133 -0
  97. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaAttributes.js.map +1 -0
  98. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaEffects.js +236 -0
  99. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaEffects.js.map +1 -0
  100. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaUnits.js +60 -0
  101. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDogmaUnits.js.map +1 -0
  102. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDynamicItemAttributes.js +95 -0
  103. package/dist/formats/fsd/64/readers/CjsFsd64SchemaDynamicItemAttributes.js.map +1 -0
  104. package/dist/formats/fsd/64/readers/CjsFsd64SchemaEpicArcs.js +106 -0
  105. package/dist/formats/fsd/64/readers/CjsFsd64SchemaEpicArcs.js.map +1 -0
  106. package/dist/formats/fsd/64/readers/CjsFsd64SchemaExpertSystems.js +86 -0
  107. package/dist/formats/fsd/64/readers/CjsFsd64SchemaExpertSystems.js.map +1 -0
  108. package/dist/formats/fsd/64/readers/CjsFsd64SchemaFactions.js +117 -0
  109. package/dist/formats/fsd/64/readers/CjsFsd64SchemaFactions.js.map +1 -0
  110. package/dist/formats/fsd/64/readers/CjsFsd64SchemaGraphicIds.js +70 -0
  111. package/dist/formats/fsd/64/readers/CjsFsd64SchemaGraphicIds.js.map +1 -0
  112. package/dist/formats/fsd/64/readers/CjsFsd64SchemaGraphicMaterialSets.js +173 -0
  113. package/dist/formats/fsd/64/readers/CjsFsd64SchemaGraphicMaterialSets.js.map +1 -0
  114. package/dist/formats/fsd/64/readers/CjsFsd64SchemaGroups.js +77 -0
  115. package/dist/formats/fsd/64/readers/CjsFsd64SchemaGroups.js.map +1 -0
  116. package/dist/formats/fsd/64/readers/CjsFsd64SchemaIcons.js +62 -0
  117. package/dist/formats/fsd/64/readers/CjsFsd64SchemaIcons.js.map +1 -0
  118. package/dist/formats/fsd/64/readers/CjsFsd64SchemaMarketGroups.js +63 -0
  119. package/dist/formats/fsd/64/readers/CjsFsd64SchemaMarketGroups.js.map +1 -0
  120. package/dist/formats/fsd/64/readers/CjsFsd64SchemaMetaGroups.js +86 -0
  121. package/dist/formats/fsd/64/readers/CjsFsd64SchemaMetaGroups.js.map +1 -0
  122. package/dist/formats/fsd/64/readers/CjsFsd64SchemaNpcCorporationDivisions.js +72 -0
  123. package/dist/formats/fsd/64/readers/CjsFsd64SchemaNpcCorporationDivisions.js.map +1 -0
  124. package/dist/formats/fsd/64/readers/CjsFsd64SchemaNpcCorporations.js +326 -0
  125. package/dist/formats/fsd/64/readers/CjsFsd64SchemaNpcCorporations.js.map +1 -0
  126. package/dist/formats/fsd/64/readers/CjsFsd64SchemaPaperdolls.js +279 -0
  127. package/dist/formats/fsd/64/readers/CjsFsd64SchemaPaperdolls.js.map +1 -0
  128. package/dist/formats/fsd/64/readers/CjsFsd64SchemaRaces.js +64 -0
  129. package/dist/formats/fsd/64/readers/CjsFsd64SchemaRaces.js.map +1 -0
  130. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSchoolMap.js +40 -0
  131. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSchoolMap.js.map +1 -0
  132. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSchools.js +113 -0
  133. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSchools.js.map +1 -0
  134. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkillPlans.js +130 -0
  135. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkillPlans.js.map +1 -0
  136. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentCategories.js +38 -0
  137. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentCategories.js.map +1 -0
  138. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentPointValues.js +45 -0
  139. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentPointValues.js.map +1 -0
  140. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentRarities.js +44 -0
  141. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponentRarities.js.map +1 -0
  142. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponents.js +163 -0
  143. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrComponents.js.map +1 -0
  144. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotCategories.js +37 -0
  145. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotCategories.js.map +1 -0
  146. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotConfigurations.js +77 -0
  147. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotConfigurations.js.map +1 -0
  148. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotNames.js +37 -0
  149. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlotNames.js.map +1 -0
  150. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlots.js +74 -0
  151. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrSlots.js.map +1 -0
  152. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrTierThresholds.js +44 -0
  153. package/dist/formats/fsd/64/readers/CjsFsd64SchemaSkinrTierThresholds.js.map +1 -0
  154. package/dist/formats/fsd/64/readers/CjsFsd64SchemaStationOperations.js +120 -0
  155. package/dist/formats/fsd/64/readers/CjsFsd64SchemaStationOperations.js.map +1 -0
  156. package/dist/formats/fsd/64/readers/CjsFsd64SchemaStationServices.js +49 -0
  157. package/dist/formats/fsd/64/readers/CjsFsd64SchemaStationServices.js.map +1 -0
  158. package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeDogma.js +73 -0
  159. package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeDogma.js.map +1 -0
  160. package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeLists.js +122 -0
  161. package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeLists.js.map +1 -0
  162. package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeMaterials.js +83 -0
  163. package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypeMaterials.js.map +1 -0
  164. package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypes.js +194 -0
  165. package/dist/formats/fsd/64/readers/CjsFsd64SchemaTypes.js.map +1 -0
  166. package/dist/formats/fsd/64/readers/index.js +58 -0
  167. package/dist/formats/fsd/64/readers/index.js.map +1 -0
  168. package/dist/formats/fsd/CjsFsdFormat.js +62 -0
  169. package/dist/formats/fsd/CjsFsdFormat.js.map +1 -0
  170. package/dist/formats/fsd/index.js +9 -0
  171. package/dist/formats/fsd/index.js.map +1 -0
  172. package/dist/formats/gif/CjsGifFormat.js +26 -16
  173. package/dist/formats/gif/CjsGifFormat.js.map +1 -1
  174. package/dist/formats/gif/core/helpers.js +6 -18
  175. package/dist/formats/gif/core/helpers.js.map +1 -1
  176. package/dist/formats/gltf/CjsGltfFormat.js +25 -13
  177. package/dist/formats/gltf/CjsGltfFormat.js.map +1 -1
  178. package/dist/formats/gr2/CjsGr2Format.js +27 -6
  179. package/dist/formats/gr2/CjsGr2Format.js.map +1 -1
  180. package/dist/formats/hlsl/CjsHlslFormat.js +20 -16
  181. package/dist/formats/hlsl/CjsHlslFormat.js.map +1 -1
  182. package/dist/formats/hlsl/core/analysis.js +1 -1
  183. package/dist/formats/index.js +5 -0
  184. package/dist/formats/index.js.map +1 -1
  185. package/dist/formats/jpeg/CjsJpegFormat.js +26 -19
  186. package/dist/formats/jpeg/CjsJpegFormat.js.map +1 -1
  187. package/dist/formats/jpeg/core/helpers.js +6 -15
  188. package/dist/formats/jpeg/core/helpers.js.map +1 -1
  189. package/dist/formats/jpeg/core/jpeg.js +0 -3
  190. package/dist/formats/jpeg/core/jpeg.js.map +1 -1
  191. package/dist/formats/mp3/CjsMp3Format.js +19 -19
  192. package/dist/formats/mp3/CjsMp3Format.js.map +1 -1
  193. package/dist/formats/mp3/core/helpers.js +5 -11
  194. package/dist/formats/mp3/core/helpers.js.map +1 -1
  195. package/dist/formats/mp4/CjsMp4Format.js +20 -19
  196. package/dist/formats/mp4/CjsMp4Format.js.map +1 -1
  197. package/dist/formats/mp4/core/helpers.js +6 -15
  198. package/dist/formats/mp4/core/helpers.js.map +1 -1
  199. package/dist/formats/obj/CjsObjFormat.js +25 -12
  200. package/dist/formats/obj/CjsObjFormat.js.map +1 -1
  201. package/dist/formats/ogg/CjsOggFormat.js +26 -17
  202. package/dist/formats/ogg/CjsOggFormat.js.map +1 -1
  203. package/dist/formats/ogg/core/helpers.js +5 -16
  204. package/dist/formats/ogg/core/helpers.js.map +1 -1
  205. package/dist/formats/pickle/CjsPickleFormat.js +64 -5
  206. package/dist/formats/pickle/CjsPickleFormat.js.map +1 -1
  207. package/dist/formats/png/CjsPngFormat.js +28 -19
  208. package/dist/formats/png/CjsPngFormat.js.map +1 -1
  209. package/dist/formats/png/core/helpers.js +5 -14
  210. package/dist/formats/png/core/helpers.js.map +1 -1
  211. package/dist/formats/red/CjsRedFormat.js +19 -5
  212. package/dist/formats/red/CjsRedFormat.js.map +1 -1
  213. package/dist/formats/schemabound/CjsSchemaBoundFormat.js +48 -38
  214. package/dist/formats/schemabound/CjsSchemaBoundFormat.js.map +1 -1
  215. package/dist/formats/sqlite/CjsSqliteFormat.js +49 -41
  216. package/dist/formats/sqlite/CjsSqliteFormat.js.map +1 -1
  217. package/dist/formats/static/CjsStaticFormat.js +15 -57
  218. package/dist/formats/static/CjsStaticFormat.js.map +1 -1
  219. package/dist/formats/static/staticContainers.js +6 -6
  220. package/dist/formats/static/staticContainers.js.map +1 -1
  221. package/dist/formats/stl/CjsStlFormat.js +25 -12
  222. package/dist/formats/stl/CjsStlFormat.js.map +1 -1
  223. package/dist/formats/tga/CjsTgaFormat.js +26 -19
  224. package/dist/formats/tga/CjsTgaFormat.js.map +1 -1
  225. package/dist/formats/tga/core/helpers.js +7 -22
  226. package/dist/formats/tga/core/helpers.js.map +1 -1
  227. package/dist/formats/wav/CjsWavFormat.js +26 -19
  228. package/dist/formats/wav/CjsWavFormat.js.map +1 -1
  229. package/dist/formats/wav/core/helpers.js +7 -16
  230. package/dist/formats/wav/core/helpers.js.map +1 -1
  231. package/dist/formats/webgl/CjsWebglFormat.js +11 -13
  232. package/dist/formats/webgl/CjsWebglFormat.js.map +1 -1
  233. package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js +90 -12
  234. package/dist/formats/webgl/core/glsl/DxbcGlslEmitter.js.map +1 -1
  235. package/dist/formats/webgl/core/helpers.js +2 -2
  236. package/dist/formats/webgl/core/helpers.js.map +1 -1
  237. package/dist/formats/webgl/core/readGlslEffectContainer.js +8 -8
  238. package/dist/formats/webgl/core/readGlslEffectContainer.js.map +1 -1
  239. package/dist/formats/webgpu/CjsWebgpuFormat.js +11 -5
  240. package/dist/formats/webgpu/CjsWebgpuFormat.js.map +1 -1
  241. package/dist/formats/webm/CjsWebmFormat.js +20 -19
  242. package/dist/formats/webm/CjsWebmFormat.js.map +1 -1
  243. package/dist/formats/webm/core/helpers.js +6 -15
  244. package/dist/formats/webm/core/helpers.js.map +1 -1
  245. package/dist/formats/webp/CjsWebpFormat.js +19 -17
  246. package/dist/formats/webp/CjsWebpFormat.js.map +1 -1
  247. package/dist/formats/webp/core/helpers.js +5 -11
  248. package/dist/formats/webp/core/helpers.js.map +1 -1
  249. package/dist/formats/wem/CjsWemFormat.js +128 -141
  250. package/dist/formats/wem/CjsWemFormat.js.map +1 -1
  251. package/dist/formats/wem/core/helpers.js +1 -114
  252. package/dist/formats/wem/core/helpers.js.map +1 -1
  253. package/dist/formats/wem/core/{resolve.js → probeCodecSupport.js} +11 -18
  254. package/dist/formats/wem/core/probeCodecSupport.js.map +1 -0
  255. package/dist/formats/yaml/CjsYamlFormat.js +20 -5
  256. package/dist/formats/yaml/CjsYamlFormat.js.map +1 -1
  257. package/dist/generated/index.js +2 -0
  258. package/dist/generated/index.js.map +1 -0
  259. package/dist/generated/resources/Tr2RaycastGeometryRes.js +34 -0
  260. package/dist/generated/resources/Tr2RaycastGeometryRes.js.map +1 -0
  261. package/dist/generated/resources/index.js +2 -0
  262. package/dist/generated/resources/index.js.map +1 -0
  263. package/dist/index.js +3 -1
  264. package/dist/index.js.map +1 -1
  265. package/dist/resource/CjsResource.js +134 -0
  266. package/dist/resource/CjsResource.js.map +1 -1
  267. package/dist/resource/ResourceRequirement.js +42 -0
  268. package/dist/resource/ResourceRequirement.js.map +1 -0
  269. package/dist/resource/Tr2LightProfileRes.js +2 -1
  270. package/dist/resource/Tr2LightProfileRes.js.map +1 -1
  271. package/dist/resource/geometry/TriGeometryRes.js +34 -7
  272. package/dist/resource/geometry/TriGeometryRes.js.map +1 -1
  273. package/dist/resource/geometry/granny/Tr2GrannyStateRes.js +184 -7
  274. package/dist/resource/geometry/granny/Tr2GrannyStateRes.js.map +1 -1
  275. package/dist/resource/geometry/granny/TriGrannyRes.js +20 -8
  276. package/dist/resource/geometry/granny/TriGrannyRes.js.map +1 -1
  277. package/dist/resource/index.js +1 -0
  278. package/dist/resource/index.js.map +1 -1
  279. package/dist/resource/resourceBoundary.js +24 -1
  280. package/dist/resource/resourceBoundary.js.map +1 -1
  281. package/dist/resource/shader/Tr2EffectRes.js +2 -1
  282. package/dist/resource/shader/Tr2EffectRes.js.map +1 -1
  283. package/dist/resource/texture/CjsTextureArrayRes.js +2 -1
  284. package/dist/resource/texture/CjsTextureArrayRes.js.map +1 -1
  285. package/dist/resource/texture/Tr2ImageRes.js +2 -1
  286. package/dist/resource/texture/Tr2ImageRes.js.map +1 -1
  287. package/dist/resource/texture/TriTextureRes.js +40 -2
  288. package/dist/resource/texture/TriTextureRes.js.map +1 -1
  289. package/docs/architecture.md +121 -116
  290. package/docs/concepts/format-capabilities.md +90 -0
  291. package/docs/formats/README.md +14 -6
  292. package/docs/formats/fsd.md +104 -0
  293. package/docs/formats/gr2.md +1 -1
  294. package/docs/formats/hlsl/reference/api.md +6 -4
  295. package/docs/formats/provenance.md +18 -0
  296. package/docs/formats/schemabound.md +10 -4
  297. package/docs/formats/static.md +26 -26
  298. package/docs/formats/webgpu/reference/api.md +4 -3
  299. package/docs/reference/classes/core.md +22 -2
  300. package/docs/reference/classes/formats.md +643 -1
  301. package/docs/reference/classes/resources.md +463 -453
  302. package/docs/reference/queues.md +205 -194
  303. package/docs/roadmap.md +14 -18
  304. package/format-notices/fsd/LICENSE +21 -0
  305. package/format-notices/fsd/NOTICE +11 -0
  306. package/package.json +70 -64
  307. package/dist/formats/wem/core/resolve.js.map +0 -1
  308. package/docs/concepts/format-type-resolution.md +0 -79
@@ -1,188 +1,163 @@
1
- import { DEFAULT_VALUES, normalizeValues, readWithValues, inspectWithValues, isSupportedWithValues, toJsonValue, isWEM, toBytes, OUTPUT_OGG, OUTPUT_PCM, OUTPUT_WEM_JSON, OUTPUT_JSON, OUTPUT_RAW, WEM_CODEC_NAMES } from './core/helpers.js';
2
- import { resolveTypeWithValues } from './core/resolve.js';
1
+ import { CjsFormat } from '../../format/CjsFormat.js';
2
+ import { DEFAULT_VALUES, OUTPUT_RAW, OUTPUT_OGG, OUTPUT_PCM, OUTPUT_WEM_JSON, normalizeValues, readWithValues, inspectWithValues, toJsonValue, isWEM, toBytes, OUTPUT_JSON, WEM_CODEC_NAMES } from './core/helpers.js';
3
+ import { probeCodecSupportWithValues } from './core/probeCodecSupport.js';
3
4
 
4
5
  const FORMAT_NAME = "CjsWemFormat";
5
6
 
6
- /**
7
- * Reader for Audiokinetic Wwise media (.wem) containers.
8
- *
9
- * Inspection identifies the codec, channel/rate layout, and Vorbis duration
10
- * without decoding audio data. Read emits the container bytes untouched by
11
- * default; `emit: "ogg"` repacks Wwise Vorbis into a standard Ogg stream and
12
- * `emit: "pcm"` decodes PTADPCM / 16-bit PCM media to float32 samples.
7
+ /**
8
+ * Reader for Audiokinetic Wwise media (.wem) containers.
9
+ *
10
+ * Inspection identifies the codec, channel/rate layout, and Vorbis duration
11
+ * without decoding audio data. Read emits the container bytes untouched by
12
+ * default; `emit: "ogg"` repacks Wwise Vorbis into a standard Ogg stream and
13
+ * `emit: "pcm"` decodes PTADPCM / 16-bit PCM media to float32 samples.
13
14
  */
14
- class CjsWemFormat {
15
+ class CjsWemFormat extends CjsFormat {
15
16
  #values = DEFAULT_VALUES;
16
17
 
17
- /**
18
- * Browser-worker module declaration consumed by CjsResManWorkerLoader.
18
+ /**
19
+ * Browser-worker module declaration consumed by CjsResManWorkerLoader.
19
20
  */
20
21
  static worker = Object.freeze({
21
22
  module: import.meta.url,
22
- exportName: "CjsWemFormat"
23
+ exportName: "CjsWemFormat",
24
+ outputTypes: Object.freeze([OUTPUT_RAW, OUTPUT_OGG, OUTPUT_PCM, OUTPUT_WEM_JSON]),
25
+ defaultOutput: OUTPUT_RAW
23
26
  });
24
27
 
25
- /**
26
- * Create a reusable wem format profile.
27
- *
28
- * @param {object} [options] Default read/inspect options.
28
+ /**
29
+ * Create a reusable wem format profile.
30
+ *
31
+ * @param {object} [options] Default read/inspect options.
29
32
  */
30
33
  constructor(options = {}) {
34
+ super();
31
35
  this.SetValues(options);
32
36
  }
33
37
 
34
- /**
35
- * Merge options into this profile.
36
- *
37
- * @param {object} [options] Values to merge.
38
- * @returns {CjsWemFormat} This format profile.
38
+ /**
39
+ * Merge options into this profile.
40
+ *
41
+ * @param {object} [options] Values to merge.
42
+ * @returns {CjsWemFormat} This format profile.
39
43
  */
40
44
  SetValues(options = {}) {
41
45
  this.#values = normalizeValues(this.#values, options, FORMAT_NAME);
42
46
  return this;
43
47
  }
44
48
 
45
- /**
46
- * Get normalized profile values with optional per-call overrides.
47
- *
48
- * @param {object} [options] Per-call values.
49
- * @returns {object} Normalized read values.
49
+ /**
50
+ * Get normalized profile values with optional per-call overrides.
51
+ *
52
+ * @param {object} [options] Per-call values.
53
+ * @returns {object} Normalized read values.
50
54
  */
51
55
  GetValues(options = {}) {
52
56
  return normalizeValues(this.#values, options, FORMAT_NAME);
53
57
  }
54
58
 
55
- /**
56
- * Read wem bytes with this profile.
57
- *
58
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
59
- * @param {object} [options] Per-call values.
60
- * @returns {object} GPU-free raw/debug payload for the selected emit target.
59
+ /**
60
+ * Read wem bytes with this profile.
61
+ *
62
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
63
+ * @param {object} [options] Per-call values.
64
+ * @returns {object} GPU-free raw/debug payload for the selected emit target.
61
65
  */
62
66
  Read(input, options = {}) {
63
67
  return readWithValues(input, this.GetValues(options));
64
68
  }
65
69
 
66
- /**
67
- * Read wem bytes asynchronously with this profile.
68
- *
69
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
70
- * @param {object} [options] Per-call values.
71
- * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.
70
+ /**
71
+ * Read wem bytes asynchronously with this profile.
72
+ *
73
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
74
+ * @param {object} [options] Per-call values.
75
+ * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.
72
76
  */
73
77
  async ReadAsync(input, options = {}) {
74
78
  return this.Read(input, options);
75
79
  }
76
80
 
77
- /**
78
- * Inspect wem bytes without decoding audio data.
79
- *
80
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
81
- * @param {object} [options] Per-call values.
82
- * @returns {object} Wwise container metadata.
81
+ /**
82
+ * Inspect wem bytes without decoding audio data.
83
+ *
84
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
85
+ * @param {object} [options] Per-call values.
86
+ * @returns {object} Wwise container metadata.
83
87
  */
84
88
  Inspect(input, options = {}) {
85
89
  return inspectWithValues(input, this.GetValues(options));
86
90
  }
87
91
 
88
- /**
89
- * Report whether wem input and requested output variants are supported.
90
- *
91
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
92
- * @param {object} [options] Per-call values.
93
- * @returns {object} Support/probe report.
94
- */
95
- IsSupported(input, options = {}) {
96
- return isSupportedWithValues(input, this.GetValues(options));
97
- }
98
-
99
- /**
100
- * Convert format output into JSON-compatible debug data.
101
- *
102
- * @param {any} value Format output.
103
- * @returns {any} JSON-compatible value.
92
+ /**
93
+ * Convert format output into JSON-compatible debug data.
94
+ *
95
+ * @param {any} value Format output.
96
+ * @returns {any} JSON-compatible value.
104
97
  */
105
98
  ToJSON(value) {
106
99
  return toJsonValue(value);
107
100
  }
108
101
 
109
- /**
110
- * One-shot wem read.
111
- *
112
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
113
- * @param {object} [options] Read options.
114
- * @returns {object} GPU-free raw/debug payload for the selected emit target.
102
+ /**
103
+ * One-shot wem read.
104
+ *
105
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
106
+ * @param {object} [options] Read options.
107
+ * @returns {object} GPU-free raw/debug payload for the selected emit target.
115
108
  */
116
109
  static read(input, options = {}) {
117
110
  return readWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
118
111
  }
119
112
 
120
- /**
121
- * One-shot asynchronous wem read.
122
- *
123
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
124
- * @param {object} [options] Read options.
125
- * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.
113
+ /**
114
+ * One-shot asynchronous wem read.
115
+ *
116
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
117
+ * @param {object} [options] Read options.
118
+ * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.
126
119
  */
127
120
  static async readAsync(input, options = {}) {
128
121
  return CjsWemFormat.read(input, options);
129
122
  }
130
123
 
131
- /**
132
- * One-shot wem inspection.
133
- *
134
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
135
- * @param {object} [options] Inspect options.
136
- * @returns {object} Wwise container metadata.
124
+ /**
125
+ * One-shot wem inspection.
126
+ *
127
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
128
+ * @param {object} [options] Inspect options.
129
+ * @returns {object} Wwise container metadata.
137
130
  */
138
131
  static inspect(input, options = {}) {
139
132
  return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
140
133
  }
141
134
 
142
- /**
143
- * One-shot wem support probe.
144
- *
145
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
146
- * @param {object} [options] Probe options.
147
- * @returns {object} Support/probe report.
135
+ /**
136
+ * One-shot wem support probe.
137
+ *
138
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
139
+ * @param {object} [options] Probe options.
140
+ * @returns {object} Support/probe report.
148
141
  */
149
- static isSupported(input, options = {}) {
150
- return isSupportedWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
142
+ static probeSupport(input, options = {}) {
143
+ return probeCodecSupportWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
151
144
  }
152
145
 
153
- /**
154
- * Content-verified codec/route resolution (resolveType seam; see docs/concepts/format-type-resolution.md).
155
- *
156
- * Where `isSupported` trusts the fmt tag, this validates the declared
157
- * codec against the container's actual structure (Vorbis sidecar,
158
- * PTADPCM frame layout, PCM size consistency - bounded, no audio
159
- * decode) and tries the other codecs when the declaration fails.
160
- * The report carries `verified: true`, `preferred` = `ogg`/`pcm`/`raw`,
161
- * and declared/resolved/mismatch evidence in `metadata`.
162
- *
163
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
164
- * @param {object} [options] Probe options.
165
- * @returns {Promise<object>} Content-verified probe report.
166
- */
167
- static async resolveType(input, options = {}) {
168
- return resolveTypeWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));
169
- }
170
-
171
- /**
172
- * Convert format output into JSON-compatible debug data.
173
- *
174
- * @param {any} value Format output.
175
- * @returns {any} JSON-compatible value.
146
+ /**
147
+ * Convert format output into JSON-compatible debug data.
148
+ *
149
+ * @param {any} value Format output.
150
+ * @returns {any} JSON-compatible value.
176
151
  */
177
152
  static toJSON(value) {
178
153
  return toJsonValue(value);
179
154
  }
180
155
 
181
- /**
182
- * Test whether bytes look like a Wwise media container.
183
- *
184
- * @param {Uint8Array|ArrayBuffer|DataView} input Candidate wem bytes.
185
- * @returns {boolean} True when RIFF/RIFX WAVE signatures are present.
156
+ /**
157
+ * Test whether bytes look like a Wwise media container.
158
+ *
159
+ * @param {Uint8Array|ArrayBuffer|DataView} input Candidate wem bytes.
160
+ * @returns {boolean} True when RIFF/RIFX WAVE signatures are present.
186
161
  */
187
162
  static isWEM(input) {
188
163
  try {
@@ -192,16 +167,16 @@ class CjsWemFormat {
192
167
  }
193
168
  }
194
169
 
195
- /**
196
- * Repack Wwise Vorbis wem bytes into a standard Ogg Vorbis stream.
197
- *
198
- * Lossless container transform (no audio decode/re-encode); output plays
199
- * natively where Ogg Vorbis is supported. Equivalent to
200
- * `read(input, { emit: "ogg" })`.
201
- *
202
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
203
- * @param {object} [options] Options, including a `codebooks` override.
204
- * @returns {object} Ogg payload with bytes, timing, and loop metadata.
170
+ /**
171
+ * Repack Wwise Vorbis wem bytes into a standard Ogg Vorbis stream.
172
+ *
173
+ * Lossless container transform (no audio decode/re-encode); output plays
174
+ * natively where Ogg Vorbis is supported. Equivalent to
175
+ * `read(input, { emit: "ogg" })`.
176
+ *
177
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
178
+ * @param {object} [options] Options, including a `codebooks` override.
179
+ * @returns {object} Ogg payload with bytes, timing, and loop metadata.
205
180
  */
206
181
  static toOgg(input, options = {}) {
207
182
  return CjsWemFormat.read(input, {
@@ -210,16 +185,16 @@ class CjsWemFormat {
210
185
  });
211
186
  }
212
187
 
213
- /**
214
- * Decode wem audio data to per-channel float32 PCM (AudioBuffer-ready).
215
- *
216
- * Covers Wwise PTADPCM (0x8311) and uncompressed 16-bit PCM. Wwise Vorbis
217
- * is not decoded here - repack it with `toOgg()` instead. Equivalent to
218
- * `read(input, { emit: "pcm" })`.
219
- *
220
- * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
221
- * @param {object} [options] Read options.
222
- * @returns {object} PCM payload with channelData, sample rate, and timing.
188
+ /**
189
+ * Decode wem audio data to per-channel float32 PCM (AudioBuffer-ready).
190
+ *
191
+ * Covers Wwise PTADPCM (0x8311) and uncompressed 16-bit PCM. Wwise Vorbis
192
+ * is not decoded here - repack it with `toOgg()` instead. Equivalent to
193
+ * `read(input, { emit: "pcm" })`.
194
+ *
195
+ * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.
196
+ * @param {object} [options] Read options.
197
+ * @returns {object} PCM payload with channelData, sample rate, and timing.
223
198
  */
224
199
  static toPcm(input, options = {}) {
225
200
  return CjsWemFormat.read(input, {
@@ -228,8 +203,8 @@ class CjsWemFormat {
228
203
  });
229
204
  }
230
205
 
231
- /**
232
- * Emit targets for this format (canonical frozen enum).
206
+ /**
207
+ * Emit targets for this format (canonical frozen enum).
233
208
  */
234
209
  static Output = Object.freeze({
235
210
  RAW: OUTPUT_RAW,
@@ -239,11 +214,23 @@ class CjsWemFormat {
239
214
  PCM: OUTPUT_PCM
240
215
  });
241
216
  static CODEC_NAMES = WEM_CODEC_NAMES;
242
- static type = Object.freeze(["audio"]);
217
+ static id = "wem";
243
218
  static mediaTypes = Object.freeze(["audio"]);
244
- static inputTypes = Object.freeze(["wem"]);
245
- static outputTypes = Object.freeze([OUTPUT_RAW, OUTPUT_OGG, OUTPUT_PCM]);
246
- static debugOutputTypes = Object.freeze([OUTPUT_WEM_JSON, OUTPUT_RAW]);
219
+ static outputs = CjsFormat.defineOutputs({
220
+ raw: {
221
+ default: true,
222
+ passthrough: true
223
+ },
224
+ ogg: {},
225
+ pcm: {
226
+ decoded: true
227
+ },
228
+ wemJson: {
229
+ role: "debug",
230
+ probes: ["wemJson", "raw"]
231
+ }
232
+ });
233
+ static extensions = Object.freeze([".wem"]);
247
234
  }
248
235
 
249
236
  export { CjsWemFormat };
@@ -1 +1 @@
1
- {"version":3,"file":"CjsWemFormat.js","sources":["../../../../src/formats/wem/CjsWemFormat.js"],"sourcesContent":["import {\r\n DEFAULT_VALUES,\r\n OUTPUT_JSON,\r\n OUTPUT_OGG,\r\n OUTPUT_PCM,\r\n OUTPUT_RAW,\r\n OUTPUT_WEM_JSON,\r\n WEM_CODEC_NAMES,\r\n inspectWithValues,\r\n isSupportedWithValues,\r\n isWEM,\r\n normalizeValues,\r\n readWithValues,\r\n toBytes,\r\n toJsonValue\r\n} from \"./core/helpers.js\";\r\nimport { resolveTypeWithValues } from \"./core/resolve.js\";\r\n\r\nconst FORMAT_NAME = \"CjsWemFormat\";\r\n\r\n/**\r\n * Reader for Audiokinetic Wwise media (.wem) containers.\r\n *\r\n * Inspection identifies the codec, channel/rate layout, and Vorbis duration\r\n * without decoding audio data. Read emits the container bytes untouched by\r\n * default; `emit: \"ogg\"` repacks Wwise Vorbis into a standard Ogg stream and\r\n * `emit: \"pcm\"` decodes PTADPCM / 16-bit PCM media to float32 samples.\r\n */\r\nexport class CjsWemFormat\r\n{\r\n #values = DEFAULT_VALUES;\r\n\r\n /**\r\n * Browser-worker module declaration consumed by CjsResManWorkerLoader.\r\n */\r\n static worker = Object.freeze({\r\n module: import.meta.url,\r\n exportName: \"CjsWemFormat\"\r\n });\r\n\r\n /**\r\n * Create a reusable wem 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 {CjsWemFormat} 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 wem bytes with this profile.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\r\n * @param {object} [options] Per-call values.\r\n * @returns {object} GPU-free raw/debug 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 wem bytes asynchronously with this profile.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\r\n * @param {object} [options] Per-call values.\r\n * @returns {Promise<object>} GPU-free raw/debug 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 wem bytes without decoding audio data.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\r\n * @param {object} [options] Per-call values.\r\n * @returns {object} Wwise container 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 wem input and requested output variants are supported.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem 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 wem read.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\r\n * @param {object} [options] Read options.\r\n * @returns {object} GPU-free raw/debug 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 wem read.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\r\n * @param {object} [options] Read options.\r\n * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.\r\n */\r\n static async readAsync(input, options = {})\r\n {\r\n return CjsWemFormat.read(input, options);\r\n }\r\n\r\n /**\r\n * One-shot wem inspection.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\r\n * @param {object} [options] Inspect options.\r\n * @returns {object} Wwise container 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 wem support probe.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem 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 * Content-verified codec/route resolution (resolveType seam; see docs/concepts/format-type-resolution.md).\r\n *\r\n * Where `isSupported` trusts the fmt tag, this validates the declared\r\n * codec against the container's actual structure (Vorbis sidecar,\r\n * PTADPCM frame layout, PCM size consistency - bounded, no audio\r\n * decode) and tries the other codecs when the declaration fails.\r\n * The report carries `verified: true`, `preferred` = `ogg`/`pcm`/`raw`,\r\n * and declared/resolved/mismatch evidence in `metadata`.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\r\n * @param {object} [options] Probe options.\r\n * @returns {Promise<object>} Content-verified probe report.\r\n */\r\n static async resolveType(input, options = {})\r\n {\r\n return resolveTypeWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\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 media container.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Candidate wem bytes.\r\n * @returns {boolean} True when RIFF/RIFX WAVE signatures are present.\r\n */\r\n static isWEM(input)\r\n {\r\n try\r\n {\r\n return isWEM(toBytes(input));\r\n }\r\n catch\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Repack Wwise Vorbis wem bytes into a standard Ogg Vorbis stream.\r\n *\r\n * Lossless container transform (no audio decode/re-encode); output plays\r\n * natively where Ogg Vorbis is supported. Equivalent to\r\n * `read(input, { emit: \"ogg\" })`.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\r\n * @param {object} [options] Options, including a `codebooks` override.\r\n * @returns {object} Ogg payload with bytes, timing, and loop metadata.\r\n */\r\n static toOgg(input, options = {})\r\n {\r\n return CjsWemFormat.read(input, { ...options, emit: OUTPUT_OGG });\r\n }\r\n\r\n /**\r\n * Decode wem audio data to per-channel float32 PCM (AudioBuffer-ready).\r\n *\r\n * Covers Wwise PTADPCM (0x8311) and uncompressed 16-bit PCM. Wwise Vorbis\r\n * is not decoded here - repack it with `toOgg()` instead. Equivalent to\r\n * `read(input, { emit: \"pcm\" })`.\r\n *\r\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\r\n * @param {object} [options] Read options.\r\n * @returns {object} PCM payload with channelData, sample rate, and timing.\r\n */\r\n static toPcm(input, options = {})\r\n {\r\n return CjsWemFormat.read(input, { ...options, emit: OUTPUT_PCM });\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 WEM_JSON: OUTPUT_WEM_JSON,\r\n OGG: OUTPUT_OGG,\r\n PCM: OUTPUT_PCM\r\n });\r\n static CODEC_NAMES = WEM_CODEC_NAMES;\r\n static type = Object.freeze([ \"audio\" ]);\r\n static mediaTypes = Object.freeze([ \"audio\" ]);\r\n static inputTypes = Object.freeze([ \"wem\" ]);\r\n static outputTypes = Object.freeze([ OUTPUT_RAW, OUTPUT_OGG, OUTPUT_PCM ]);\r\n static debugOutputTypes = Object.freeze([ OUTPUT_WEM_JSON, OUTPUT_RAW ]);\r\n}\r\n\r\nexport default CjsWemFormat;\r\n"],"names":["FORMAT_NAME","CjsWemFormat","DEFAULT_VALUES","worker","Object","freeze","module","import","meta","url","exportName","constructor","options","SetValues","normalizeValues","GetValues","Read","input","readWithValues","ReadAsync","Inspect","inspectWithValues","IsSupported","isSupportedWithValues","ToJSON","value","toJsonValue","read","readAsync","inspect","isSupported","resolveType","resolveTypeWithValues","toJSON","isWEM","toBytes","toOgg","emit","OUTPUT_OGG","toPcm","OUTPUT_PCM","Output","RAW","OUTPUT_RAW","JSON","OUTPUT_JSON","WEM_JSON","OUTPUT_WEM_JSON","OGG","PCM","CODEC_NAMES","WEM_CODEC_NAMES","type","mediaTypes","inputTypes","outputTypes","debugOutputTypes"],"mappings":";;;AAkBA,MAAMA,WAAW,GAAG,cAAc;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,CACzB;EACI,OAAO,GAAGC,cAAc;;AAExB;AACJ;AACA;AACI,EAAA,OAAOC,MAAM,GAAGC,MAAM,CAACC,MAAM,CAAC;AAC1BC,IAAAA,MAAM,EAAEC,MAAM,CAACC,IAAI,CAACC,GAAG;AACvBC,IAAAA,UAAU,EAAE;AAChB,GAAC,CAAC;;AAEF;AACJ;AACA;AACA;AACA;AACIC,EAAAA,WAAWA,CAACC,OAAO,GAAG,EAAE,EACxB;AACI,IAAA,IAAI,CAACC,SAAS,CAACD,OAAO,CAAC;AAC3B,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACIC,EAAAA,SAASA,CAACD,OAAO,GAAG,EAAE,EACtB;AACI,IAAA,IAAI,CAAC,OAAO,GAAGE,eAAe,CAAC,IAAI,CAAC,OAAO,EAAEF,OAAO,EAAEZ,WAAW,CAAC;AAClE,IAAA,OAAO,IAAI;AACf,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACIe,EAAAA,SAASA,CAACH,OAAO,GAAG,EAAE,EACtB;IACI,OAAOE,eAAe,CAAC,IAAI,CAAC,OAAO,EAAEF,OAAO,EAAEZ,WAAW,CAAC;AAC9D,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACIgB,EAAAA,IAAIA,CAACC,KAAK,EAAEL,OAAO,GAAG,EAAE,EACxB;IACI,OAAOM,cAAc,CAACD,KAA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACI,OAAOC,KAAKA,CAACtB,KAAK,EAAEL,OAAO,GAAG,EAAE,EAChC;AACI,IAAA,OAAOX,YAAY,CAAC0B,IAAI,CAACV,KAAK,EAAE;AAAE,MAAA,GAAGL,OAAO;AAAEyB,MAAAA,IAAI,EAAEG;AAAW,KAAC,CAAC;AACrE,EAAA;;AAEA;AACJ;AACA;AACI,EAAA,OAAOC,MAAM,GAAGrC,MAAM,CAACC,MAAM,CAAC;AAC1BqC,IAAAA,GAAG,EAAEC,UAAU;AACfC,IAAAA,IAAI,EAAEC,WAAW;AACjBC,IAAAA,QAAQ,EAAEC,eAAe;AACzBC,IAAAA,GAAG,EAAEV,UAAU;AACfW,IAAAA,GAAG,EAAET;AACT,GAAC,CAAC;EACF,OAAOU,WAAW,GAAGC,eAAe;EACpC,OAAOC,IAAI,GAAGhD,MAAM,CAACC,MAAM,CAAC,CAAE,OAAO,CAAE,CAAC;EACxC,OAAOgD,UAAU,GAAGjD,MAAM,CAACC,MAAM,CAAC,CAAE,OAAO,CAAE,CAAC;EAC9C,OAAOiD,UAAU,GAAGlD,MAAM,CAACC,MAAM,CAAC,CAAE,KAAK,CAAE,CAAC;AAC5C,EAAA,OAAOkD,WAAW,GAAGnD,MAAM,CAACC,MAAM,CAAC,CAAEsC,UAAU,EAAEL,UAAU,EAAEE,UAAU,CAAE,CAAC;EAC1E,OAAOgB,gBAAgB,GAAGpD,MAAM,CAACC,MAAM,CAAC,CAAE0C,eAAe,EAAEJ,UAAU,CAAE,CAAC;AAC5E;;;;"}
1
+ {"version":3,"file":"CjsWemFormat.js","sources":["../../../../src/formats/wem/CjsWemFormat.js"],"sourcesContent":["import { CjsFormat } from \"../../format/CjsFormat.js\";\nimport {\n DEFAULT_VALUES,\n OUTPUT_JSON,\n OUTPUT_OGG,\n OUTPUT_PCM,\n OUTPUT_RAW,\n OUTPUT_WEM_JSON,\n WEM_CODEC_NAMES,\n inspectWithValues,\n probeSupportWithValues,\n isWEM,\n normalizeValues,\n readWithValues,\n toBytes,\n toJsonValue\n} from \"./core/helpers.js\";\nimport { probeCodecSupportWithValues } from \"./core/probeCodecSupport.js\";\n\nconst FORMAT_NAME = \"CjsWemFormat\";\n\n/**\n * Reader for Audiokinetic Wwise media (.wem) containers.\n *\n * Inspection identifies the codec, channel/rate layout, and Vorbis duration\n * without decoding audio data. Read emits the container bytes untouched by\n * default; `emit: \"ogg\"` repacks Wwise Vorbis into a standard Ogg stream and\n * `emit: \"pcm\"` decodes PTADPCM / 16-bit PCM media to float32 samples.\n */\nexport class CjsWemFormat extends CjsFormat\n{\n #values = DEFAULT_VALUES;\n\n /**\n * Browser-worker module declaration consumed by CjsResManWorkerLoader.\n */\n static worker = Object.freeze({\n module: import.meta.url,\n exportName: \"CjsWemFormat\",\n outputTypes: Object.freeze([ OUTPUT_RAW, OUTPUT_OGG, OUTPUT_PCM, OUTPUT_WEM_JSON ]),\n defaultOutput: OUTPUT_RAW\n });\n\n /**\n * Create a reusable wem format profile.\n *\n * @param {object} [options] Default read/inspect options.\n */\n constructor(options = {})\n {\n super();\n this.SetValues(options);\n }\n\n /**\n * Merge options into this profile.\n *\n * @param {object} [options] Values to merge.\n * @returns {CjsWemFormat} 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 wem bytes with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} GPU-free raw/debug payload for the selected emit target.\n */\n Read(input, options = {})\n {\n return readWithValues(input, this.GetValues(options));\n }\n\n /**\n * Read wem bytes asynchronously with this profile.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Per-call values.\n * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.\n */\n async ReadAsync(input, options = {})\n {\n return this.Read(input, options);\n }\n\n /**\n * Inspect wem bytes without decoding audio data.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Per-call values.\n * @returns {object} Wwise container metadata.\n */\n Inspect(input, options = {})\n {\n return inspectWithValues(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 wem read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Read options.\n * @returns {object} GPU-free raw/debug 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 wem read.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Read options.\n * @returns {Promise<object>} GPU-free raw/debug payload for the selected emit target.\n */\n static async readAsync(input, options = {})\n {\n return CjsWemFormat.read(input, options);\n }\n\n /**\n * One-shot wem inspection.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Inspect options.\n * @returns {object} Wwise container metadata.\n */\n static inspect(input, options = {})\n {\n return inspectWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\n }\n\n /**\n * One-shot wem support probe.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Probe options.\n * @returns {object} Support/probe report.\n */\n static probeSupport(input, options = {})\n {\n return probeCodecSupportWithValues(input, normalizeValues(DEFAULT_VALUES, options, FORMAT_NAME));\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 bytes look like a Wwise media container.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Candidate wem bytes.\n * @returns {boolean} True when RIFF/RIFX WAVE signatures are present.\n */\n static isWEM(input)\n {\n try\n {\n return isWEM(toBytes(input));\n }\n catch\n {\n return false;\n }\n }\n\n /**\n * Repack Wwise Vorbis wem bytes into a standard Ogg Vorbis stream.\n *\n * Lossless container transform (no audio decode/re-encode); output plays\n * natively where Ogg Vorbis is supported. Equivalent to\n * `read(input, { emit: \"ogg\" })`.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Options, including a `codebooks` override.\n * @returns {object} Ogg payload with bytes, timing, and loop metadata.\n */\n static toOgg(input, options = {})\n {\n return CjsWemFormat.read(input, { ...options, emit: OUTPUT_OGG });\n }\n\n /**\n * Decode wem audio data to per-channel float32 PCM (AudioBuffer-ready).\n *\n * Covers Wwise PTADPCM (0x8311) and uncompressed 16-bit PCM. Wwise Vorbis\n * is not decoded here - repack it with `toOgg()` instead. Equivalent to\n * `read(input, { emit: \"pcm\" })`.\n *\n * @param {Uint8Array|ArrayBuffer|DataView} input Wem bytes.\n * @param {object} [options] Read options.\n * @returns {object} PCM payload with channelData, sample rate, and timing.\n */\n static toPcm(input, options = {})\n {\n return CjsWemFormat.read(input, { ...options, emit: OUTPUT_PCM });\n }\n\n /**\n * Emit targets for this format (canonical frozen enum).\n */\n static Output = Object.freeze({\n RAW: OUTPUT_RAW,\n JSON: OUTPUT_JSON,\n WEM_JSON: OUTPUT_WEM_JSON,\n OGG: OUTPUT_OGG,\n PCM: OUTPUT_PCM\n });\n static CODEC_NAMES = WEM_CODEC_NAMES;\n static id = \"wem\";\n static mediaTypes = Object.freeze([ \"audio\" ]);\n static outputs = CjsFormat.defineOutputs({\n raw: { default: true, passthrough: true },\n ogg: { },\n pcm: { decoded: true },\n wemJson: { role: \"debug\", probes: [ \"wemJson\", \"raw\" ] }\n });\n static extensions = Object.freeze([ \".wem\" ]);\n}\n\nexport default CjsWemFormat;\n"],"names":["FORMAT_NAME","CjsWemFormat","CjsFormat","DEFAULT_VALUES","worker","Object","freeze","module","import","meta","url","exportName","outputTypes","OUTPUT_RAW","OUTPUT_OGG","OUTPUT_PCM","OUTPUT_WEM_JSON","defaultOutput","constructor","options","SetValues","normalizeValues","GetValues","Read","input","readWithValues","ReadAsync","Inspect","inspectWithValues","ToJSON","value","toJsonValue","read","readAsync","inspect","probeSupport","probeCodecSupportWithValues","toJSON","isWEM","toBytes","toOgg","emit","toPcm","Output","RAW","JSON","OUTPUT_JSON","WEM_JSON","OGG","PCM","CODEC_NAMES","WEM_CODEC_NAMES","id","mediaTypes","outputs","defineOutputs","raw","default","passthrough","ogg","pcm","decoded","wemJson","role","probes","extensions"],"mappings":";;;;AAmBA,MAAMA,WAAW,GAAG,cAAc;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,SAASC,SAAS,CAC3C;EACI,OAAO,GAAGC,cAAc;;AAExB;AACJ;AACA;AACI,EAAA,OAAOC,MAAM,GAAGC,MAAM,CAACC,MAAM,CAAC;AAC1BC,IAAAA,MAAM,EAAEC,MAAM,CAACC,IAAI,CAACC,GAAG;AACvBC,IAAAA,UAAU,EAAE,cAAc;AAC1BC,IAAAA,WAAW,EAAEP,MAAM,CAACC,MAAM,CAAC,CAAEO,UAAU,EAAEC,UAAU,EAAEC,UAAU,EAAEC,eAAe,CAAE,CAAC;AACnFC,IAAAA,aAAa,EAAEJ;AACnB,GAAC,CAAC;;AAEF;AACJ;AACA;AACA;AACA;AACIK,EAAAA,WAAWA,CAACC,OAAO,GAAG,EAAE,EACxB;AACI,IAAA,KAAK,EAAE;AACP,IAAA,IAAI,CAACC,SAAS,CAACD,OAAO,CAAC;AAC3B,EAAA;;AAEA;AACJ;AACA;AACA;AACA;AACA;AACIC,EAAAA,SAASA,CAACD,OAAO,GAAG,EAAE,EACtB;AACI,IAAA,IAAI,CAAC,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;EACI,OAAO4B,KAAKA,CAAClB,KAAK,EAAEL,OAAO,GAAG,EAAE,EAChC;AACI,IAAA,OAAOlB,YAAY,CAAC+B,IAAI,CAACR,KAAK,EAAE;AAAE,MAAA,GAAGL,OAAO;AAAEsB,MAAAA,IAAI,EAAE1B;AAAW,KAAC,CAAC;AACrE,EAAA;;AAEA;AACJ;AACA;AACI,EAAA,OAAO4B,MAAM,GAAGtC,MAAM,CAACC,MAAM,CAAC;AAC1BsC,IAAAA,GAAG,EAAE/B,UAAU;AACfgC,IAAAA,IAAI,EAAEC,WAAW;AACjBC,IAAAA,QAAQ,EAAE/B,eAAe;AACzBgC,IAAAA,GAAG,EAAElC,UAAU;AACfmC,IAAAA,GAAG,EAAElC;AACT,GAAC,CAAC;EACF,OAAOmC,WAAW,GAAGC,eAAe;EACpC,OAAOC,EAAE,GAAG,KAAK;EACjB,OAAOC,UAAU,GAAGhD,MAAM,CAACC,MAAM,CAAC,CAAE,OAAO,CAAE,CAAC;AAC9C,EAAA,OAAOgD,OAAO,GAAGpD,SAAS,CAACqD,aAAa,CAAC;AACrCC,IAAAA,GAAG,EAAE;AAAEC,MAAAA,OAAO,EAAE,IAAI;AAAEC,MAAAA,WAAW,EAAE;KAAM;IACzCC,GAAG,EAAE,EAAI;AACTC,IAAAA,GAAG,EAAE;AAAEC,MAAAA,OAAO,EAAE;KAAM;AACtBC,IAAAA,OAAO,EAAE;AAAEC,MAAAA,IAAI,EAAE,OAAO;AAAEC,MAAAA,MAAM,EAAE,CAAE,SAAS,EAAE,KAAK;AAAG;AAC3D,GAAC,CAAC;EACF,OAAOC,UAAU,GAAG5D,MAAM,CAACC,MAAM,CAAC,CAAE,MAAM,CAAE,CAAC;AACjD;;;;"}
@@ -196,70 +196,6 @@ function inspectWithValues(input, values = DEFAULT_VALUES) {
196
196
  };
197
197
  }
198
198
 
199
- /**
200
- * Reports whether input is supported under normalized format options for the WEM
201
- * format reader.
202
- */
203
- function isSupportedWithValues(input, values = DEFAULT_VALUES) {
204
- try {
205
- const metadata = inspectWithValues(input, values);
206
- const oggSupport = getOggSupport(metadata);
207
- const pcmSupport = getPcmSupport(metadata);
208
- return {
209
- format: "wem",
210
- source: values.source || "buffer",
211
- supported: metadata.codec ? "partial" : "none",
212
- confidence: metadata.codec ? 1 : 0.5,
213
- preferred: oggSupport.supported ? OUTPUT_OGG : pcmSupport.supported ? OUTPUT_PCM : "raw",
214
- reason: metadata.codec ? oggSupport.supported ? "Wwise Vorbis recognized; repacks losslessly to Ogg Vorbis." : metadata.codec === "wwise-vorbis" ? oggSupport.reason : "Wwise media container recognized; payloads pass through undecoded." : "RIFF/RIFX container recognized but no fmt chunk was found.",
215
- metadata,
216
- variants: [{
217
- kind: "raw",
218
- payloadType: "raw",
219
- codec: metadata.codec || "unknown",
220
- mimeType: "application/octet-stream",
221
- supported: true,
222
- containerOnly: true,
223
- isDecoded: false,
224
- pcmDecodeSupported: false
225
- }, {
226
- kind: OUTPUT_OGG,
227
- payloadType: "raw",
228
- codec: "vorbis",
229
- mimeType: "audio/ogg",
230
- supported: oggSupport.supported,
231
- containerOnly: true,
232
- isDecoded: false,
233
- reason: oggSupport.supported ? "" : oggSupport.reason
234
- }, {
235
- kind: OUTPUT_PCM,
236
- payloadType: OUTPUT_PCM,
237
- codec: "float32",
238
- supported: pcmSupport.supported,
239
- containerOnly: false,
240
- isDecoded: true,
241
- pcmDecodeSupported: pcmSupport.supported,
242
- reason: pcmSupport.supported ? "" : pcmSupport.reason
243
- }],
244
- warnings: [],
245
- errors: []
246
- };
247
- } catch (error) {
248
- return {
249
- format: "wem",
250
- source: values.source || "buffer",
251
- supported: "none",
252
- confidence: 0,
253
- preferred: "",
254
- reason: error.message,
255
- metadata: null,
256
- variants: [],
257
- warnings: [],
258
- errors: [error.message]
259
- };
260
- }
261
- }
262
-
263
199
  // PCM decode routing by codec: PTADPCM decodes through its own module;
264
200
  // uncompressed 16-bit PCM deinterleaves directly. Compressed codecs with
265
201
  // their own containers (Vorbis, Opus, XMA) are not decoded here - Vorbis
@@ -294,47 +230,6 @@ function decodeToPcm(bytes, metadata) {
294
230
  error.sourceFormat = "wem";
295
231
  throw error;
296
232
  }
297
- function getPcmSupport(metadata) {
298
- if (metadata.codec === "wwise-ptadpcm") return {
299
- supported: true,
300
- reason: ""
301
- };
302
- if ((metadata.codec === "pcm" || metadata.codec === "pcm-extensible") && metadata.bitsPerSample === 16) {
303
- return {
304
- supported: true,
305
- reason: ""
306
- };
307
- }
308
- return {
309
- supported: false,
310
- reason: "PCM decode covers PTADPCM and 16-bit PCM; use the ogg emit for Wwise Vorbis."
311
- };
312
- }
313
- function getOggSupport(metadata) {
314
- if (metadata.codec !== "wwise-vorbis") {
315
- return {
316
- supported: false,
317
- reason: "Only Wwise Vorbis media can be repacked to Ogg."
318
- };
319
- }
320
- const vorbSize = metadata.vorbis?.vorbSize;
321
- if (vorbSize === 0x28 || vorbSize === 0x2c) {
322
- return {
323
- supported: false,
324
- reason: "Wwise Vorbis recognized, but old header-triad Wwise Vorbis is not supported by this repacker."
325
- };
326
- }
327
- if (!metadata.vorbis) {
328
- return {
329
- supported: false,
330
- reason: "Wwise Vorbis recognized, but no Vorbis layout metadata was found."
331
- };
332
- }
333
- return {
334
- supported: true,
335
- reason: ""
336
- };
337
- }
338
233
 
339
234
  /** Reads input using normalized format options for the WEM format reader. */
340
235
  function readWithValues(input, values = DEFAULT_VALUES) {
@@ -357,9 +252,6 @@ function readWithValues(input, values = DEFAULT_VALUES) {
357
252
  outputFormat: "ogg",
358
253
  codec: "vorbis",
359
254
  mimeType: "audio/ogg",
360
- containerOnly: true,
361
- isDecoded: false,
362
- pcmDecodeSupported: false,
363
255
  sampleCount: ogg.sampleCount,
364
256
  sampleRate: ogg.sampleRate,
365
257
  channels: ogg.channels,
@@ -378,8 +270,6 @@ function readWithValues(input, values = DEFAULT_VALUES) {
378
270
  outputFormat: OUTPUT_PCM,
379
271
  codec: "float32",
380
272
  sourceCodec: metadata.codec,
381
- isDecoded: true,
382
- pcmDecodeSupported: true,
383
273
  sampleCount: decoded.sampleCount,
384
274
  sampleRate: decoded.sampleRate,
385
275
  channels: decoded.channels,
@@ -394,9 +284,6 @@ function readWithValues(input, values = DEFAULT_VALUES) {
394
284
  sourceFormat: "wem",
395
285
  codec: metadata.codec,
396
286
  mimeType: "application/octet-stream",
397
- containerOnly: true,
398
- isDecoded: false,
399
- pcmDecodeSupported: false,
400
287
  metadata,
401
288
  bytes
402
289
  };
@@ -433,5 +320,5 @@ function readU32(bytes, offset, littleEndian) {
433
320
  return littleEndian ? (bytes[offset] | bytes[offset + 1] << 8 | bytes[offset + 2] << 16 | bytes[offset + 3] * 0x1000000) >>> 0 : bytes[offset] * 0x1000000 + (bytes[offset + 1] << 16) + (bytes[offset + 2] << 8) + bytes[offset + 3] >>> 0;
434
321
  }
435
322
 
436
- export { DEFAULT_VALUES, OUTPUT_JSON, OUTPUT_OGG, OUTPUT_PCM, OUTPUT_RAW, OUTPUT_WEM_JSON, WEM_CODEC_NAMES, inspectWEM, inspectWithValues, isSupportedWithValues, isWEM, normalizeEmit, normalizeValues, readWithValues, toBytes, toJsonValue };
323
+ export { DEFAULT_VALUES, OUTPUT_JSON, OUTPUT_OGG, OUTPUT_PCM, OUTPUT_RAW, OUTPUT_WEM_JSON, WEM_CODEC_NAMES, inspectWEM, inspectWithValues, isWEM, normalizeEmit, normalizeValues, readWithValues, toBytes, toJsonValue };
437
324
  //# sourceMappingURL=helpers.js.map