Adjustments for the new client
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
/// <reference path="../../exports/exports.d.ts" />
|
||||
console.log("HELLO WORLD");
|
||||
module.paths.push("../../build/linux_x64");
|
||||
module.paths.push("../../build/win32_64");
|
||||
|
||||
//LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5
|
||||
const os = require('os');
|
||||
//process.dlopen(module, '/usr/lib/x86_64-linux-gnu/libasan.so.5',
|
||||
// os.constants.dlopen.RTLD_NOW);
|
||||
import * as fs from "fs";
|
||||
|
||||
const original_require = require;
|
||||
@@ -118,8 +123,8 @@ const do_connect = () => {
|
||||
timeout: 5000,
|
||||
remote_port: 9987,
|
||||
//remote_host: "188.40.240.20", /* twerion */
|
||||
remote_host: "localhost",
|
||||
//remote_host: "ts.teaspeak.de",
|
||||
//remote_host: "localhost",
|
||||
remote_host: "ts.teaspeak.de",
|
||||
//remote_host: "51.68.181.92",
|
||||
//remote_host: "94.130.236.135",
|
||||
//remote_host: "54.36.232.11", /* the beast */
|
||||
@@ -160,11 +165,14 @@ const do_connect = () => {
|
||||
console.log(">> Audio end");
|
||||
};
|
||||
|
||||
connection._voice_connection.set_audio_source(consumer);
|
||||
/*
|
||||
consumer.callback_data = buffer => {
|
||||
console.log("Sending voice data");
|
||||
connection.send_voice_data_raw(buffer, consumer.channels, consumer.sample_rate, true);
|
||||
//stream.write_data_rated(buffer.buffer, true, consumer.sample_rate);
|
||||
};
|
||||
*/
|
||||
}
|
||||
},
|
||||
|
||||
@@ -173,12 +181,15 @@ const do_connect = () => {
|
||||
});
|
||||
|
||||
connection.callback_voice_data = (buffer, client_id, codec_id, flag_head, packet_id) => {
|
||||
console.log("Having data!");
|
||||
connection.send_voice_data(buffer, codec_id, flag_head);
|
||||
}
|
||||
};
|
||||
|
||||
connection.callback_command = (command, arguments1, switches) => {
|
||||
console.log("Command: %s", command);
|
||||
}
|
||||
|
||||
connection._voice_connection.register_client(7);
|
||||
};
|
||||
do_connect();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user