- change task priorities
- optimize time_sync_msg_cb() regarding execution speed - add some debug messages - change wifi tx buffer to static and change size Signed-off-by: Karl Osterseher <karli_o@gmx.at>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
// size?!
|
||||
#define CHNK_CTRL_CNT 2
|
||||
|
||||
#define LATENCY_MEDIAN_FILTER_LEN 199 // 299 //499 // 199 // 29 // 99
|
||||
#define LATENCY_MEDIAN_FILTER_LEN 199
|
||||
|
||||
// set to 0 if you do not wish to be the median an average around actual
|
||||
// median average will be (LATENCY_MEDIAN_FILTER_LEN /
|
||||
@@ -22,8 +22,8 @@
|
||||
// reality n+1 samples will be averaged
|
||||
#define LATENCY_MEDIAN_AVG_DIVISOR 0
|
||||
|
||||
#define SHORT_BUFFER_LEN 199 // 99
|
||||
#define MINI_BUFFER_LEN 39 // 19
|
||||
#define SHORT_BUFFER_LEN 99
|
||||
#define MINI_BUFFER_LEN 19
|
||||
|
||||
typedef struct pcm_chunk_fragment pcm_chunk_fragment_t;
|
||||
struct pcm_chunk_fragment {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define SYNC_TASK_PRIORITY (configMAX_PRIORITIES - 1)
|
||||
#define SYNC_TASK_PRIORITY (configMAX_PRIORITIES - 2)
|
||||
#define SYNC_TASK_CORE_ID 1 // tskNO_AFFINITY
|
||||
|
||||
static const char *TAG = "PLAYER";
|
||||
@@ -1305,8 +1305,8 @@ static void player_task(void *pvParameters) {
|
||||
|
||||
const bool enableControlLoop = true;
|
||||
|
||||
const int64_t shortOffset = 8; // 20; //µs, softsync
|
||||
const int64_t miniOffset = 1; //µs, softsync
|
||||
const int64_t shortOffset = 2; // 8; // 20; //µs, softsync
|
||||
const int64_t miniOffset = 1; //µs, softsync
|
||||
const int64_t hardResyncThreshold = 10000; //µs, hard sync
|
||||
|
||||
if (initialSync == 1) {
|
||||
@@ -1386,9 +1386,18 @@ static void player_task(void *pvParameters) {
|
||||
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);
|
||||
// ESP_LOGI(TAG, "%d, %lldus, %lldus, %lldus, q:%d", dir, avg,
|
||||
// shortMedian, miniMedian, uxQueueMessagesWaiting(pcmChkQHdl));
|
||||
// ESP_LOGI( TAG, "8b f %d b %d",
|
||||
// heap_caps_get_free_size(MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL),
|
||||
// heap_caps_get_largest_free_block
|
||||
// (MALLOC_CAP_8BIT |
|
||||
// MALLOC_CAP_INTERNAL));
|
||||
// ESP_LOGI( TAG, "32b f %d b %d",
|
||||
// heap_caps_get_free_size(MALLOC_CAP_32BIT | MALLOC_CAP_EXEC),
|
||||
// heap_caps_get_largest_free_block
|
||||
// (MALLOC_CAP_32BIT |
|
||||
// MALLOC_CAP_EXEC));
|
||||
}
|
||||
|
||||
dir = 0;
|
||||
|
||||
Reference in New Issue
Block a user