@@ -109,6 +109,7 @@ class SnapProcessor {
109
109
codec_type codec_from_server = NO_CODEC;
110
110
SnapMessageBase base_message;
111
111
SnapMessageTime time_message;
112
+ SnapMessageServerSettings server_settings_message;
112
113
uint32_t client_state_muted = 0 ;
113
114
char *start = nullptr ;
114
115
int size = 0 ;
@@ -142,6 +143,7 @@ class SnapProcessor {
142
143
bool rc = true ;
143
144
while (rc) {
144
145
rc = processMessageLoop ();
146
+ // some additional processing while we wait for data
145
147
processExt ();
146
148
// logHeap();
147
149
checkHeap ();
@@ -150,13 +152,14 @@ class SnapProcessor {
150
152
if (id_counter % 100 == 0 ) {
151
153
logHeap ();
152
154
}
153
- checkHeap ();
155
+ // For rtos, give audio output some space
154
156
delay (1 );
155
157
return true ;
156
158
}
157
159
158
160
// / additional processing
159
161
virtual void processExt () {
162
+ // For rtos, give audio output some space
160
163
delay (5 );
161
164
}
162
165
@@ -242,7 +245,7 @@ class SnapProcessor {
242
245
hello_message.hostname = CONFIG_SNAPCAST_CLIENT_NAME;
243
246
hello_message.version = " 0.0.2" ;
244
247
hello_message.client_name = " libsnapcast" ;
245
- hello_message.os = " esp32 " ;
248
+ hello_message.os = " arduino " ;
246
249
hello_message.arch = " xtensa" ;
247
250
hello_message.instance = 1 ;
248
251
hello_message.id = mac_address;
@@ -421,11 +424,9 @@ class SnapProcessor {
421
424
422
425
bool processMessageServerSettings () {
423
426
ESP_LOGD (TAG, " start" );
424
- SnapMessageServerSettings server_settings_message;
425
-
426
427
// The first 4 bytes in the buffer are the size of the string.
427
428
// We don't need this, so we'll shift the entire buffer over 4 bytes
428
- // and use the extra room to add a null character so cJSON can pares
429
+ // and use the extra room to add a null character so we can pares
429
430
// it.
430
431
memmove (start, start + 4 , size - 4 );
431
432
start[size - 3 ] = ' \0 ' ;
0 commit comments