Browse Source

RTP thread priority increase

philippe44 5 years ago
parent
commit
8a6295a016
2 changed files with 5 additions and 5 deletions
  1. 4 4
      components/raop/rtp.c
  2. 1 1
      components/squeezelite/output.c

+ 4 - 4
components/raop/rtp.c

@@ -201,7 +201,7 @@ rtp_resp_t rtp_init(struct in_addr host, int latency, char *aeskey, char *aesiv,
 	rtp_resp_t resp = { 0, 0, 0, NULL };
 
 	if (!ctx) return resp;
-
+	
 	ctx->host = host;
 	ctx->decrypt = false;
 	ctx->cmd_cb = cmd_cb;
@@ -263,7 +263,7 @@ rtp_resp_t rtp_init(struct in_addr host, int latency, char *aeskey, char *aesiv,
 #ifdef WIN32
 		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 , &ctx->rtp_thread);
+		xTaskCreate((TaskFunction_t) rtp_thread_func, "RTP_thread", 4096, ctx,  CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT + 1 , &ctx->rtp_thread);
 #endif
 	} else {
 		rtp_end(ctx);
@@ -375,7 +375,7 @@ static void alac_decode(rtp_t *ctx, s16_t *dest, char *buf, int len, int *outsiz
 	unsigned char iv[16];
 	int aeslen;
 	assert(len<=MAX_PACKET);
-
+	
 	if (ctx->decrypt) {
 		aeslen = len & ~0xf;
 		memcpy(iv, ctx->aesiv, sizeof(iv));
@@ -526,7 +526,7 @@ static void buffer_push_packet(rtp_t *ctx) {
 			rtp_request_resend(ctx, ctx->ab_read + i, ctx->ab_read + i);
 			frame->last_resend = now;
 		}
-	}
+	}
 
}
 

 

+ 1 - 1
components/squeezelite/output.c

@@ -345,7 +345,7 @@ void output_init_common(log_level level, const char *device, unsigned output_buf
 	unsigned i;
 
 	loglevel = level;
-
+	
 	output_buf_size = output_buf_size - (output_buf_size % BYTES_PER_FRAME);
 	output.init_size = output_buf_size;
 	LOG_DEBUG("outputbuf size: %u", output_buf_size);