@apocaliss92/nodelink-js 0.5.1-beta.6 → 0.5.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +15 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -41455,8 +41455,21 @@ function encodeImaAdpcm(pcm, blockSizeBytes) {
|
|
|
41455
41455
|
}
|
|
41456
41456
|
|
|
41457
41457
|
// src/reolink/baichuan/utils/audioMulaw.ts
|
|
41458
|
-
var
|
|
41459
|
-
|
|
41458
|
+
var alawmulawNs = __toESM(require("alawmulaw"), 1);
|
|
41459
|
+
function resolveAlawmulaw() {
|
|
41460
|
+
const ns = alawmulawNs;
|
|
41461
|
+
if (ns.mulaw && ns.alaw) {
|
|
41462
|
+
return { mulaw: ns.mulaw, alaw: ns.alaw };
|
|
41463
|
+
}
|
|
41464
|
+
const fallback = ns.default;
|
|
41465
|
+
if (fallback?.mulaw && fallback?.alaw) {
|
|
41466
|
+
return { mulaw: fallback.mulaw, alaw: fallback.alaw };
|
|
41467
|
+
}
|
|
41468
|
+
throw new Error(
|
|
41469
|
+
"alawmulaw: unable to resolve mulaw/alaw codecs from module exports"
|
|
41470
|
+
);
|
|
41471
|
+
}
|
|
41472
|
+
var { mulaw, alaw } = resolveAlawmulaw();
|
|
41460
41473
|
function mulawToPcm16(bytes) {
|
|
41461
41474
|
if (bytes.length === 0) return new Int16Array(0);
|
|
41462
41475
|
return mulaw.decode(bytes);
|