Skip to content

Commit

Permalink
don't stop client in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Feb 26, 2024
1 parent 090159e commit 668f7a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/SnapConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# define CONFIG_NVS_FLASH false
#endif
#ifndef CONFIG_CHECK_HEAP
# define CONFIG_CHECK_HEAP true
# define CONFIG_CHECK_HEAP false
#endif

// snapcast parameters;
Expand Down
6 changes: 4 additions & 2 deletions src/api/SnapProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class SnapProcessor {
virtual void end() {
ESP_LOGD(TAG, "end");
audioEnd();
// ESP_LOGI(TAG, "... done reading from socket");
p_client->stop();
send_receive_buffer.resize(0);
base_message_serialized.resize(0);
}
Expand Down Expand Up @@ -141,8 +143,8 @@ class SnapProcessor {
checkHeap();
}

ESP_LOGI(TAG, "... done reading from socket");
p_client->stop();
// ESP_LOGI(TAG, "... done reading from socket");
// p_client->stop();

if (id_counter % 100 == 0) {
logHeap();
Expand Down
2 changes: 1 addition & 1 deletion src/api/SnapProcessorRTOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SnapProcessorRTOS : public SnapProcessor {
const uint16_t TASK_STACK_SIZE = 10 * 1024;
cpp_freertos::Task task{"output", TASK_STACK_SIZE, 1, task_copy};
cpp_freertos::Queue size_queue{200, sizeof(size_t)};
audio_tools::SynchronizedBufferRTOS<uint8_t> buffer{1024 * 20};
audio_tools::SynchronizedBufferRTOS<uint8_t> buffer{0};
bool task_started = false;
int active_percent;
static SnapProcessorRTOS *self;
Expand Down

0 comments on commit 668f7a0

Please sign in to comment.