Skip to content

Commit 5f23a37

Browse files
committed
Compile errors for ESP32 1.0.6
1 parent cf8d69a commit 5f23a37

File tree

4 files changed

+714
-55
lines changed

4 files changed

+714
-55
lines changed

src/AudioCodecs/CodecBase64.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class EncoderBase64 : public AudioEncoder {
213213
frame_size = 4;
214214
}
215215
p_print->write('\n');
216-
p_print->flush();
216+
flush();
217217
}
218218
}
219219

@@ -261,6 +261,16 @@ class EncoderBase64 : public AudioEncoder {
261261
static char encoding_table[64];
262262
static int mod_table[3];
263263

264+
void flush() {
265+
#if defined(ESP32)
266+
# if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(3, 3, 5)
267+
p_print->flush();
268+
# endif
269+
#else
270+
p_print->flush();
271+
#endif
272+
}
273+
264274
void encodeLine(uint8_t *data, size_t input_length) {
265275
LOGD("EncoderBase64::encodeLine: %d",input_length);
266276
int output_length = 4 * ((input_length + 2) / 3);
@@ -291,7 +301,7 @@ class EncoderBase64 : public AudioEncoder {
291301
}
292302

293303
writeBlocking(p_print, ret.data(), output_length);
294-
p_print->flush();
304+
flush();
295305
}
296306
};
297307

src/AudioTimer/AudioTimerRP2040.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TimerAlarmRepeatingDriverRP2040 : public TimerAlarmRepeatingDriverBase {
3131
*/
3232
bool begin(const my_repeating_timer_callback_t callback_f, uint32_t time, TimeUnit unit = MS) override {
3333
bool result = false;
34-
LOGI("timer time: %u %s",time, unit==MS ? "ms": "us");
34+
LOGI("timer time: %u %s",(unsigned int)time, unit==MS ? "ms": "us");
3535
this->instanceCallback = callback_f;
3636

3737
// we determine the time in microseconds

src/AudioTools/ResampleStream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class ResampleStream : public ReformatBaseStream {
364364
T val1 = lookup<T>(data, frame_idx1, channel);
365365

366366
float result = mapFloat(frame_idx, frame_idx1, frame_idx0, val0, val1);
367-
return round(result);
367+
return (float)round(result);
368368
}
369369

370370
// lookup value for indicated frame & channel: index starts with -1;

0 commit comments

Comments
 (0)