- add eclipse project configuration
- use espressif ADF, remove external opus rep o uses audio pipelines now - change code to use flac decoder - remove mersus code - add first try of audio synchronization o needed to sync timeofday to server on reception of server settings to avoid overflows in timeval calculations (int32_t on esp32 SDK) o still a lot of TODO's in the code, but it's almost in sync, although there is quite some chunk skipping which I am currently working on
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
#include <stddef.h>
|
||||
#include <buffer.h>
|
||||
|
||||
#include "esp_log.h"
|
||||
#include "esp_heap_caps.h"
|
||||
|
||||
/* Logging tag */
|
||||
static const char *TAG = "libSNAPCAST";
|
||||
|
||||
const int BASE_MESSAGE_SIZE = 26;
|
||||
const int TIME_MESSAGE_SIZE = 8;
|
||||
|
||||
@@ -260,7 +266,11 @@ int wire_chunk_message_deserialize(wire_chunk_message_t *msg, const char *data,
|
||||
}
|
||||
|
||||
// TODO maybe should check to see if need to free memory?
|
||||
#if CONFIG_SPIRAM
|
||||
msg->payload = (char *)heap_caps_malloc(msg->size * sizeof(char), MALLOC_CAP_SPIRAM);
|
||||
#else
|
||||
msg->payload = malloc(msg->size * sizeof(char));
|
||||
#endif
|
||||
// Failed to allocate the memory
|
||||
if (!msg->payload) {
|
||||
return 2;
|
||||
@@ -306,4 +316,7 @@ int time_message_deserialize(time_message_t *msg, const char *data, uint32_t siz
|
||||
result |= buffer_read_int32(&buffer, &(msg->latency.usec));
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user