- improve syncing

Signed-off-by: Karl Osterseher <karli_o@gmx.at>
This commit is contained in:
Karl Osterseher
2022-12-13 19:55:48 +01:00
Unverified
parent e8c382c284
commit 619a0a2e5f
2 changed files with 8 additions and 6 deletions

View File

@@ -13,7 +13,7 @@
// size?!
#define CHNK_CTRL_CNT 2
#define LATENCY_MEDIAN_FILTER_LEN 199 // 199 // 29 // 99
#define LATENCY_MEDIAN_FILTER_LEN 199 // 299 //499 // 199 // 29 // 99
#define SHORT_BUFFER_LEN 99
#define MINI_BUFFER_LEN 19

View File

@@ -1263,9 +1263,10 @@ static void player_task(void *pvParameters) {
const bool enableControlLoop = true;
const int64_t shortOffset = 100; //µs, softsync
const int64_t miniOffset = shortOffset / 2; // 50; //µs, softsync
const int64_t hardResyncThreshold = 10000; //µs, hard sync
const int64_t shortOffset = 8; // 20; //µs, softsync
const int64_t miniOffset =
1; // shortOffset / 2; // 50; //µs, softsync
const int64_t hardResyncThreshold = 10000; //µs, hard sync
if (initialSync == 1) {
avg = age;
@@ -1343,8 +1344,9 @@ static void player_task(void *pvParameters) {
msec = usec / 1000;
usec = usec % 1000;
// ESP_LOGI (TAG, "%d, %lldus, %lldus %llds, %lld.%lldms", dir, age,
// avg, sec, msec, usec); ESP_LOGI (TAG, "%d, %lldus, %lldus, %lldus",
// dir, avg, shortMedian, miniMedian);
// avg, sec, msec, usec);
// ESP_LOGI (TAG, "%d, %lldus, %lldus, %lldus", dir, avg, shortMedian,
// miniMedian);
}
dir = 0;