This commit is contained in:
WolverinDEV 2018-04-18 20:51:53 +02:00
parent 64f9c9b4af
commit e1bb07e2a7
7 changed files with 302 additions and 0 deletions

143
js/workers/WorkerCodec.js Normal file
View file

@ -0,0 +1,143 @@
const prefix = "[CodecWorker] ";
const workerCallbackToken = "callback_token";
var CodecWorkerType;
(function (CodecWorkerType) {
CodecWorkerType[CodecWorkerType["WORKER_OPUS"] = 0] = "WORKER_OPUS";
})(CodecWorkerType || (CodecWorkerType = {}));
let codecInstance;
onmessage = function (e) {
let data = JSON.parse(e.data);
let res = {};
res.token = data.token;
res.success = false;
switch (data.command) {
case "initialise":
console.log(prefix + "Got initialize for type " + CodecWorkerType[data.type]);
switch (data.type) {
case CodecWorkerType.WORKER_OPUS:
codecInstance = new OpusWorker(data.channelCount, data.channelCount == 1 ? OpusType.VOIP : OpusType.AUDIO);
break;
default:
res.message = "Could not find worker type!";
console.error("Could not resolve opus type!");
return;
}
codecInstance.initialise();
res["success"] = true;
break;
case "encodeSamples":
let encodeArray = new Float32Array(data.dataLength);
for (let index = 0; index < encodeArray.length; index++)
encodeArray[index] = data.data[index];
let encodeResult = codecInstance.encode(encodeArray);
if (typeof encodeResult === "string") {
res.message = encodeResult;
}
else {
res.success = true;
res.data = encodeResult;
res.dataLength = encodeResult.length;
}
break;
case "decodeSamples":
let decodeArray = new Uint8Array(data.dataLength);
for (let index = 0; index < decodeArray.length; index++)
decodeArray[index] = data.data[index];
let decodeResult = codecInstance.decode(decodeArray);
if (typeof decodeResult === "string") {
res.message = decodeResult;
}
else {
res.success = true;
res.data = decodeResult;
res.dataLength = decodeResult.length;
}
break;
case "reset":
codecInstance.reset();
break;
default:
console.error(prefix + "Unknown type " + data.command);
}
if (res.token && res.token.length > 0)
sendMessage(res, e.origin);
};
function sendMessage(message, origin) {
postMessage(JSON.stringify(message));
}
/// <reference path="CodecWorker.ts" />
this["Module"] = typeof this["Module"] !== "undefined" ? this["Module"] : {};
let initialized = false;
Module['onRuntimeInitialized'] = function () {
initialized = true;
console.log(prefix + "Initialized!");
sendMessage({
token: workerCallbackToken,
type: "loaded",
success: true
});
};
//let Module = typeof Module !== 'undefined' ? Module : {};
try {
Module['locateFile'] = file => "../../asm/generated/" + file;
importScripts("../../asm/generated/TeaWeb-Worker-Codec-Opus.js");
}
catch (e) {
console.error("Could not load native script!");
console.log(e);
}
var OpusType;
(function (OpusType) {
OpusType[OpusType["VOIP"] = 2048] = "VOIP";
OpusType[OpusType["AUDIO"] = 2049] = "AUDIO";
OpusType[OpusType["RESTRICTED_LOWDELAY"] = 2051] = "RESTRICTED_LOWDELAY";
})(OpusType || (OpusType = {}));
class OpusWorker {
constructor(channelCount, type) {
this.bufferSize = 4096 * 2;
this.channelCount = channelCount;
this.type = type;
}
name() {
return "Opus (Type: " + OpusWorker[this.type] + " Channels: " + this.channelCount + ")";
}
initialise() {
this.fn_newHandle = Module.cwrap("codec_opus_createNativeHandle", "pointer", ["number", "number"]);
this.fn_decode = Module.cwrap("codec_opus_decode", "number", ["pointer", "pointer", "number", "number"]);
/* codec_opus_decode(handle, buffer, length, maxlength) */
this.fn_encode = Module.cwrap("codec_opus_encode", "number", ["pointer", "pointer", "number", "number"]);
this.fn_reset = Module.cwrap("codec_opus_reset", "number", ["pointer"]);
this.nativeHandle = this.fn_newHandle(this.channelCount, this.type);
this.encodeBufferRaw = Module._malloc(this.bufferSize);
this.encodeBuffer = new Float32Array(Module.HEAPF32.buffer, this.encodeBufferRaw, this.bufferSize / 4);
this.decodeBufferRaw = Module._malloc(this.bufferSize);
this.decodeBuffer = new Uint8Array(Module.HEAPU8.buffer, this.decodeBufferRaw, this.bufferSize);
}
deinitialise() { } //TODO
decode(data) {
if (data.byteLength > this.decodeBuffer.byteLength)
return "Data to long!";
this.decodeBuffer.set(data);
//console.log("decode(" + data.length + ")");
//console.log(data);
let result = this.fn_decode(this.nativeHandle, this.decodeBuffer.byteOffset, data.byteLength, this.decodeBuffer.byteLength);
if (result < 0) {
return "invalid result on decode (" + result + ")";
}
return Module.HEAPF32.slice(this.decodeBuffer.byteOffset / 4, (this.decodeBuffer.byteOffset / 4) + (result * this.channelCount));
}
encode(data) {
this.encodeBuffer.set(data);
let result = this.fn_encode(this.nativeHandle, this.encodeBuffer.byteOffset, data.length, this.encodeBuffer.byteLength);
if (result < 0) {
return "invalid result on encode (" + result + ")";
}
let buf = Module.HEAP8.slice(this.encodeBuffer.byteOffset, this.encodeBuffer.byteOffset + result);
return Uint8Array.from(buf);
}
reset() {
console.log(prefix + " Reseting opus codec!");
this.fn_reset(this.nativeHandle);
}
}
//# sourceMappingURL=WorkerCodec.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,68 @@
const prefix = "[CodecWorker] ";
const workerCallbackToken = "callback_token";
var CodecWorkerType;
(function (CodecWorkerType) {
CodecWorkerType[CodecWorkerType["WORKER_OPUS"] = 0] = "WORKER_OPUS";
})(CodecWorkerType || (CodecWorkerType = {}));
let codecInstance;
onmessage = function (e) {
let data = JSON.parse(e.data);
let res = {};
res.token = data.token;
res.success = false;
switch (data.command) {
case "initialise":
console.log(prefix + "Got initialize for type " + CodecWorkerType[data.type]);
switch (data.type) {
case CodecWorkerType.WORKER_OPUS:
codecInstance = new OpusWorker(data.channelCount, data.channelCount == 1 ? OpusType.VOIP : OpusType.AUDIO);
break;
default:
res.message = "Could not find worker type!";
console.error("Could not resolve opus type!");
return;
}
codecInstance.initialise();
res["success"] = true;
break;
case "encodeSamples":
let encodeArray = new Float32Array(data.dataLength);
for (let index = 0; index < encodeArray.length; index++)
encodeArray[index] = data.data[index];
let encodeResult = codecInstance.encode(encodeArray);
if (typeof encodeResult === "string") {
res.message = encodeResult;
}
else {
res.success = true;
res.data = encodeResult;
res.dataLength = encodeResult.length;
}
break;
case "decodeSamples":
let decodeArray = new Uint8Array(data.dataLength);
for (let index = 0; index < decodeArray.length; index++)
decodeArray[index] = data.data[index];
let decodeResult = codecInstance.decode(decodeArray);
if (typeof decodeResult === "string") {
res.message = decodeResult;
}
else {
res.success = true;
res.data = decodeResult;
res.dataLength = decodeResult.length;
}
break;
case "reset":
codecInstance.reset();
break;
default:
console.error(prefix + "Unknown type " + data.command);
}
if (res.token && res.token.length > 0)
sendMessage(res, e.origin);
};
function sendMessage(message, origin) {
postMessage(JSON.stringify(message));
}
//# sourceMappingURL=CodecWorker.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"CodecWorker.js","sourceRoot":"","sources":["CodecWorker.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,gBAAgB,CAAC;AAChC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAY7C,IAAK,eAEJ;AAFD,WAAK,eAAe;IAChB,mEAAW,CAAA;AACf,CAAC,EAFI,eAAe,KAAf,eAAe,QAEnB;AAED,IAAI,aAA0B,CAAC;AAE/B,SAAS,GAAG,UAAS,CAAC;IAClB,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAE9B,IAAI,GAAG,GAAQ,EAAE,CAAC;IAClB,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IACvB,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;IAEpB,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACnB,KAAK,YAAY;YACb,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,0BAA0B,GAAG,eAAe,CAAC,IAAI,CAAC,IAAuB,CAAC,CAAC,CAAC;YACjG,MAAM,CAAC,CAAC,IAAI,CAAC,IAAuB,CAAC,CAAC,CAAC;gBACnC,KAAK,eAAe,CAAC,WAAW;oBAC5B,aAAa,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oBAC3G,KAAK,CAAC;gBAEV;oBACI,GAAG,CAAC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,OAAO,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC;gBAClC,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC;YAC/B,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;gBACnB,GAAG,CAAC,IAAI,GAAG,YAAY,CAAC;gBACxB,GAAG,CAAC,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC;YACzC,CAAC;YACD,KAAK,CAAC;QACV,KAAK,OAAO;YACR,aAAa,CAAC,KAAK,EAAE,CAAC;YACtB,KAAK,CAAC;QACV;YACI,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED,EAAE,CAAA,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAAC,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;AACrE,CAAC,CAAC;AAGF,qBAAqB,OAAY,EAAE,MAAe;IAC9C,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;AACzC,CAAC"}

View file

@ -0,0 +1,76 @@
/// <reference path="CodecWorker.ts" />
this["Module"] = typeof this["Module"] !== "undefined" ? this["Module"] : {};
let initialized = false;
Module['onRuntimeInitialized'] = function () {
initialized = true;
console.log(prefix + "Initialized!");
sendMessage({
token: workerCallbackToken,
type: "loaded",
success: true
});
};
//let Module = typeof Module !== 'undefined' ? Module : {};
try {
Module['locateFile'] = file => "../../asm/generated/" + file;
importScripts("../../asm/generated/TeaWeb-Worker-Codec-Opus.js");
}
catch (e) {
console.error("Could not load native script!");
console.log(e);
}
var OpusType;
(function (OpusType) {
OpusType[OpusType["VOIP"] = 2048] = "VOIP";
OpusType[OpusType["AUDIO"] = 2049] = "AUDIO";
OpusType[OpusType["RESTRICTED_LOWDELAY"] = 2051] = "RESTRICTED_LOWDELAY";
})(OpusType || (OpusType = {}));
class OpusWorker {
constructor(channelCount, type) {
this.bufferSize = 4096 * 2;
this.channelCount = channelCount;
this.type = type;
}
name() {
return "Opus (Type: " + OpusWorker[this.type] + " Channels: " + this.channelCount + ")";
}
initialise() {
this.fn_newHandle = Module.cwrap("codec_opus_createNativeHandle", "pointer", ["number", "number"]);
this.fn_decode = Module.cwrap("codec_opus_decode", "number", ["pointer", "pointer", "number", "number"]);
/* codec_opus_decode(handle, buffer, length, maxlength) */
this.fn_encode = Module.cwrap("codec_opus_encode", "number", ["pointer", "pointer", "number", "number"]);
this.fn_reset = Module.cwrap("codec_opus_reset", "number", ["pointer"]);
this.nativeHandle = this.fn_newHandle(this.channelCount, this.type);
this.encodeBufferRaw = Module._malloc(this.bufferSize);
this.encodeBuffer = new Float32Array(Module.HEAPF32.buffer, this.encodeBufferRaw, this.bufferSize / 4);
this.decodeBufferRaw = Module._malloc(this.bufferSize);
this.decodeBuffer = new Uint8Array(Module.HEAPU8.buffer, this.decodeBufferRaw, this.bufferSize);
}
deinitialise() { } //TODO
decode(data) {
if (data.byteLength > this.decodeBuffer.byteLength)
return "Data to long!";
this.decodeBuffer.set(data);
//console.log("decode(" + data.length + ")");
//console.log(data);
let result = this.fn_decode(this.nativeHandle, this.decodeBuffer.byteOffset, data.byteLength, this.decodeBuffer.byteLength);
if (result < 0) {
return "invalid result on decode (" + result + ")";
}
return Module.HEAPF32.slice(this.decodeBuffer.byteOffset / 4, (this.decodeBuffer.byteOffset / 4) + (result * this.channelCount));
}
encode(data) {
this.encodeBuffer.set(data);
let result = this.fn_encode(this.nativeHandle, this.encodeBuffer.byteOffset, data.length, this.encodeBuffer.byteLength);
if (result < 0) {
return "invalid result on encode (" + result + ")";
}
let buf = Module.HEAP8.slice(this.encodeBuffer.byteOffset, this.encodeBuffer.byteOffset + result);
return Uint8Array.from(buf);
}
reset() {
console.log(prefix + " Reseting opus codec!");
this.fn_reset(this.nativeHandle);
}
}
//# sourceMapping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