Some small ChangeLog.txt

This commit is contained in:
WolverinDEV 2020-04-20 01:09:52 +02:00
parent 6393d79f54
commit 24c6c4d32c
6 changed files with 20 additions and 15 deletions

View File

@ -123,4 +123,4 @@ function deploy_client() {
#compile_scripts
#compile_native
package_client
deploy_client
#deploy_client

View File

@ -86,8 +86,8 @@ export namespace ui {
const WINDOW_HEIGHT = 400 + (process.platform == "win32" ? 40 : 0);
let bounds = screen.getPrimaryDisplay().bounds;
let x = bounds.x + (bounds.width - WINDOW_WIDTH) / 2;
let y = bounds.y + (bounds.height - WINDOW_HEIGHT) / 2;
let x = (bounds.x | 0) + ((bounds.width | 0) - WINDOW_WIDTH) / 2;
let y = (bounds.y | 0) + ((bounds.height | 0) - WINDOW_HEIGHT) / 2;
gui = new electron.BrowserWindow({
width: WINDOW_WIDTH,

View File

@ -507,7 +507,7 @@ async function load_cached_or_remote_ui_pack(channel: string, stats_update: (mes
}
} else if(remote_version.timestamp <= newest_local_version && !ignore_new_version_timestamp) {
/* We've already a equal or newer version. Don't use the remote version */
remote_version_dropped = remote_version.timestamp > bundles_ui ? bundles_ui.download_timestamp : 0; /* if remote is older than current bundled version its def. not a drop */
remote_version_dropped = !!bundles_ui && remote_version.timestamp > bundles_ui.download_timestamp; /* if remote is older than current bundled version its def. not a drop */
} else {
/* update is possible because the timestamp is newer than out latest local version */
try {

View File

@ -56,9 +56,10 @@ namespace filters {
}
export class NThresholdFilter extends NativeFilter implements filter.ThresholdFilter {
static readonly frames_per_second = 1 / (960 / 48000);
private filter: audio.record.ThresholdConsumeFilter;
private _margin_frames: number = 6; /* 120ms */
private _margin_frames: number = 25; /* 120ms */
private _threshold: number = 50;
private _callback_level: any;
@ -87,7 +88,7 @@ namespace filters {
}
get_margin_frames(): number {
return this.filter ? this.filter.get_margin_frames() : this._margin_frames;
return this.filter ? this.filter.get_margin_time() * NThresholdFilter.frames_per_second : this._margin_frames;
}
get_threshold(): number {
@ -97,7 +98,7 @@ namespace filters {
set_margin_frames(value: number) {
this._margin_frames = value;
if(this.filter)
this.filter.set_margin_frames(value);
this.filter.set_margin_time(value / 960 / 1000);
}
get_attack_smooth(): number {
@ -145,7 +146,7 @@ namespace filters {
this.filter = this.handle.consumer.create_filter_threshold(this._threshold);
if(this._callback_level)
this.filter.set_analyze_filter(this._callback_level);
this.filter.set_margin_frames(this._margin_frames);
this.filter.set_margin_time(this._margin_frames / NThresholdFilter.frames_per_second);
this.filter.set_attack_smooth(this._attack_smooth);
this.filter.set_release_smooth(this._release_smooth);
}
@ -190,9 +191,10 @@ namespace filters {
}
export class NVoiceLevelFilter extends NativeFilter implements filter.VoiceLevelFilter {
static readonly frames_per_second = 1 / (960 / 48000);
private filter: audio.record.VADConsumeFilter;
private level = 3;
private _margin_frames = 5;
private _margin_frames = 6;
constructor(handle) {
super(handle, filter.Type.VOICE_LEVEL);
@ -212,7 +214,7 @@ namespace filters {
this.finalize();
this.filter = this.handle.consumer.create_filter_vad(this.level);
this.filter.set_margin_frames(this._margin_frames);
this.filter.set_margin_time(this._margin_frames / NVoiceLevelFilter.frames_per_second);
}
get_level(): number {
@ -233,11 +235,11 @@ namespace filters {
set_margin_frames(value: number) {
this._margin_frames = value;
if(this.filter)
this.filter.set_margin_frames(value);
this.filter.set_margin_time(value / NVoiceLevelFilter.frames_per_second);
}
get_margin_frames(): number {
return this.filter ? this.filter.get_margin_frames() : this._margin_frames;
return this.filter ? this.filter.get_margin_time() * NVoiceLevelFilter.frames_per_second : this._margin_frames;
}
}
}

View File

@ -128,7 +128,7 @@ void ProtocolHandler::execute_resend() {
if(this->connection_state >= connection_state::DISCONNECTED)
return;
deque<pipes::buffer> buffers;
std::deque<std::shared_ptr<ts::connection::AcknowledgeManager::Entry>> buffers;
auto now = system_clock::now();
system_clock::time_point next = now + seconds(5); /* in real we're doing it all 500ms */
string error;
@ -146,7 +146,7 @@ void ProtocolHandler::execute_resend() {
auto socket = this->handle->get_socket();
if(socket) {
for(const auto& buffer : buffers)
socket->send_message(buffer);
socket->send_message(buffer->buffer);
}
this->handle->schedule_resend(next);

View File

@ -17,9 +17,12 @@ using namespace ts;
//#define LOG_PING
void ProtocolHandler::handlePacketAck(const std::shared_ptr<ts::protocol::ServerPacket> &ack) {
if(ack->data().length() < 2) return;
string error;
auto id = be2le16(&ack->data()[0]);
//log_trace(category::connection, tr("Handle packet acknowledge for {}"), be2le16(&ack->data()[0]));
if(!this->acknowledge_handler.process_acknowledge(ack->type().type(), ack->data(), error)) {
if(!this->acknowledge_handler.process_acknowledge(ack->type().type(), id, error)) {
log_warn(category::connection, tr("Failed to handle acknowledge {}: {}"), be2le16(&ack->data()[0]) ,error);
}
}