mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
RTP thread priority increase
This commit is contained in:
@@ -201,7 +201,7 @@ rtp_resp_t rtp_init(struct in_addr host, int latency, char *aeskey, char *aesiv,
|
||||
bool rc = true;
|
||||
rtp_t *ctx = calloc(1, sizeof(rtp_t));
|
||||
rtp_resp_t resp = { 0, 0, 0, NULL };
|
||||
|
||||
|
||||
if (!ctx) return resp;
|
||||
|
||||
ctx->host = host;
|
||||
@@ -263,7 +263,7 @@ rtp_resp_t rtp_init(struct in_addr host, int latency, char *aeskey, char *aesiv,
|
||||
if (rc) {
|
||||
ctx->running = true;
|
||||
#ifdef WIN32
|
||||
pthread_create(&ctx->rtp_thread, NULL, rtp_thread_func, (void *) ctx);
|
||||
pthread_create(&ctx->rtp_thread, NULL, rtp_thread_func, (void *) ctx);
|
||||
#else
|
||||
xTaskCreate((TaskFunction_t) rtp_thread_func, "RTP_thread", 4096, ctx, CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT + 1 , &ctx->rtp_thread);
|
||||
#endif
|
||||
@@ -375,7 +375,7 @@ static void alac_decode(rtp_t *ctx, s16_t *dest, char *buf, int len, int *outsiz
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void alac_decode(rtp_t *ctx, s16_t *dest, char *buf, int len, int *outsize) {
|
||||
unsigned char iv[16];
|
||||
int aeslen;
|
||||
int aeslen;
|
||||
assert(len<=MAX_PACKET);
|
||||
|
||||
if (ctx->decrypt) {
|
||||
@@ -526,7 +526,7 @@ static void buffer_push_packet(rtp_t *ctx) {
|
||||
abuf_t *frame = ctx->audio_buffer + BUFIDX(ctx->ab_read + i);
|
||||
if (!frame->ready && now - frame->last_resend > RESEND_TO) {
|
||||
rtp_request_resend(ctx, ctx->ab_read + i, ctx->ab_read + i);
|
||||
frame->last_resend = now;
|
||||
frame->last_resend = now;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user