Skip to content

Commit

Permalink
optimizations - release
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed May 11, 2021
1 parent 0f792d7 commit 8c0e766
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/display/display.c
Expand Up @@ -135,7 +135,7 @@ void display_init(char *welcome) {
displayer.by = 2;
displayer.pause = 3600;
displayer.speed = 33;
displayer.task = xTaskCreateStatic( (TaskFunction_t) displayer_task, "displayer_thread", DISPLAYER_STACK_SIZE, NULL, ESP_TASK_PRIO_MIN + 1, xStack, &xTaskBuffer);
displayer.task = xTaskCreateStatic( (TaskFunction_t) displayer_task, "common_displayer", DISPLAYER_STACK_SIZE, NULL, ESP_TASK_PRIO_MIN + 1, xStack, &xTaskBuffer);

// set lines for "fixed" text mode
GDS_TextSetFontAuto(display, 1, GDS_FONT_LINE_1, -3);
Expand Down
2 changes: 1 addition & 1 deletion components/squeezelite/displayer.c
Expand Up @@ -353,7 +353,7 @@ bool sb_displayer_init(void) {

// create displayer management task
displayer.mutex = xSemaphoreCreateMutex();
displayer.task = xTaskCreateStatic( (TaskFunction_t) displayer_task, "displayer_thread", SCROLL_STACK_SIZE, NULL, ESP_TASK_PRIO_MIN + 1, xStack, &xTaskBuffer);
displayer.task = xTaskCreateStatic( (TaskFunction_t) displayer_task, "squeeze_displayer", SCROLL_STACK_SIZE, NULL, ESP_TASK_PRIO_MIN + 1, xStack, &xTaskBuffer);

// chain handlers
slimp_handler_chain = slimp_handler;
Expand Down
8 changes: 4 additions & 4 deletions components/squeezelite/output_i2s.c
Expand Up @@ -357,8 +357,8 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch
{
static DRAM_ATTR StaticTask_t xTaskBuffer __attribute__ ((aligned (4)));
static DRAM_ATTR StackType_t xStack[OUTPUT_THREAD_STACK_SIZE] __attribute__ ((aligned (4)));
output_i2s_task = xTaskCreateStatic( (TaskFunction_t) output_thread_i2s, "output_i2s", OUTPUT_THREAD_STACK_SIZE,
NULL, CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT + 1, xStack, &xTaskBuffer );
output_i2s_task = xTaskCreateStaticPinnedToCore( (TaskFunction_t) output_thread_i2s, "output_i2s", OUTPUT_THREAD_STACK_SIZE,
NULL, CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT + 1, xStack, &xTaskBuffer, 0 );
}

// do we want stats
Expand Down Expand Up @@ -420,9 +420,9 @@ static int _i2s_write_frames(frames_t out_frames, bool silence, s32_t gainL, s32
}

// don't update visu if we don't have enough data in buffer
if (_buf_used(outputbuf) > outputbuf->size >> 2) {
if (silence || _buf_used(outputbuf) > outputbuf->size >> 2) {
output_visu_export(obuf + oframes * BYTES_PER_FRAME, out_frames, output.current_sample_rate, silence, (gainL + gainR) / 2);
}
}

oframes += out_frames;

Expand Down
2 changes: 1 addition & 1 deletion components/squeezelite/stream.c
Expand Up @@ -331,7 +331,7 @@ static void *stream_thread() {
if (stream.meta_interval) {
space = min(space, stream.meta_next);
}

n = _recv(ssl, fd, streambuf->writep, space, 0);
if (n == 0) {
LOG_INFO("end of stream (%u bytes)", stream.bytes);
Expand Down

0 comments on commit 8c0e766

Please sign in to comment.