Fixed some tests which caused tsc compile issues

This commit is contained in:
WolverinDEV 2019-10-25 21:38:09 +02:00
parent 2e9a367f13
commit 382c478f69
4 changed files with 8 additions and 8 deletions

2
github

@ -1 +1 @@
Subproject commit a1490ab0d97f65e27845fec6daf88be8ed6d1014
Subproject commit 14645dca78396c915ad4ad122d532f24fdfd2969

View File

@ -127,8 +127,8 @@ declare module "teaclient_connection" {
export function upload_transfer_object_from_buffer(buffer: ArrayBuffer);
export function download_transfer_object_from_buffer(target_buffer: ArrayBuffer);
export function spawn_connection(transfer: TransferOptions) : NativeFileTransfer;
export function destroy_connection(connection: NativeFileTransfer);
export function spawn_connection(transfer: TransferOptions) : NativeFileTransfer;
}
export namespace audio {

View File

@ -52,10 +52,10 @@ start_server().catch(error => {
console.error("Failed to start FT server (%o)", error);
}).then(() => {
const target_buffer = new Uint8Array(buffer_size);
const destination = handle.download_transfer_object_from_buffer(target_buffer.buffer);
const source = handle.upload_transfer_object_from_buffer(str2ab("Hello World"));
const destination = handle.ft.download_transfer_object_from_buffer(target_buffer.buffer);
const source = handle.ft.upload_transfer_object_from_buffer(str2ab("Hello World"));
const transfer = handle.spawn_file_connection({
const transfer = handle.ft.spawn_connection({
client_transfer_id: 0,
server_transfer_id: 0,

View File

@ -10,7 +10,7 @@ const os = require('os');
import * as fs from "fs";
const original_require = require;
require = module => original_require("/home/wolverindev/TeaSpeak-Client/client/native/build/linux_x64/" + module + ".node");
require = (module => original_require("/home/wolverindev/TeaSpeak-Client/client/native/build/linux_x64/" + module + ".node")) as any;
import * as handle from "teaclient_connection";
require = original_require;
@ -41,11 +41,11 @@ if(recorder.get_device() == -1) {
if(device.name != "pulse")
continue;
console.log("Found pulse at %o", device.device_index);
recorder.set_device(device.device_index);
recorder.set_device(device.device_index, () => {});
}
}
console.log("Device: %o", recorder.get_device());
recorder.start();
recorder.start(() => {});
console.log("Started: %o", recorder.started());
const consumer = recorder.create_consumer();